summaryrefslogtreecommitdiffstats
path: root/src/security.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-03 12:15:07 -0800
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-03 12:19:00 -0800
commite35dd0c0246236371269b79cc28b1a23f4999560 (patch)
tree59d611de1106fc3db522ac998e73234035a2c855 /src/security.c
parentf7d1ee361e410e096929bd3918178af356c50bbd (diff)
Add support for HCI_Simple_Pairing_Complete event
When we are the acceptors of a pairing request and we have used the Agent.DisplayPasskey we need to use the Simple Pairing Complete HCI event for calling Agent.Cancel.
Diffstat (limited to 'src/security.c')
-rw-r--r--src/security.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/security.c b/src/security.c
index 1ab952ae..1a33a9d2 100644
--- a/src/security.c
+++ b/src/security.c
@@ -784,6 +784,13 @@ static inline void auth_complete(int dev, bdaddr_t *sba, void *ptr)
hcid_dbus_bonding_process_complete(sba, &dba, evt->status);
}
+static inline void simple_pairing_complete(int dev, bdaddr_t *sba, void *ptr)
+{
+ evt_simple_pairing_complete *evt = ptr;
+
+ hcid_dbus_simple_pairing_complete(sba, &evt->bdaddr, evt->status);
+}
+
static inline void conn_request(int dev, bdaddr_t *sba, void *ptr)
{
evt_conn_request *evt = ptr;
@@ -894,6 +901,10 @@ static gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer
auth_complete(dev, &di->bdaddr, ptr);
break;
+ case EVT_SIMPLE_PAIRING_COMPLETE:
+ simple_pairing_complete(dev, &di->bdaddr, ptr);
+ break;
+
case EVT_CONN_REQUEST:
conn_request(dev, &di->bdaddr, ptr);
break;