diff options
Diffstat (limited to 'hcid/security.c')
-rw-r--r-- | hcid/security.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/hcid/security.c b/hcid/security.c index 9472930b..b4520745 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -423,6 +423,18 @@ static void io_capa_request(int dev, bdaddr_t *sba, bdaddr_t *dba) } } +static void io_capa_response(int dev, bdaddr_t *sba, void *ptr) +{ + evt_io_capability_response *evt = ptr; + char sa[18], da[18]; + + ba2str(sba, sa); ba2str(&evt->bdaddr, da); + info("io_capa_response (sba=%s, dba=%s)", sa, da); + + hcid_dbus_set_io_cap(sba, &evt->bdaddr, + evt->capability, evt->authentication); +} + /* PIN code handling */ void set_pin_length(bdaddr_t *sba, int length) @@ -887,6 +899,10 @@ static gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer io_capa_request(dev, &di->bdaddr, (bdaddr_t *) ptr); break; + case EVT_IO_CAPABILITY_RESPONSE: + io_capa_response(dev, &di->bdaddr, ptr); + break; + case EVT_USER_CONFIRM_REQUEST: user_confirm_request(dev, &di->bdaddr, ptr); break; |