From 51382802f433d7ce6ee1d5ceeeb1d90d543d0e6d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 13 Jan 2009 15:06:46 +0200 Subject: Fix new pairing detection with SSP Propagate old and new link key type info to dbus-hci.c so it can know whether this is a new pairing or not. --- src/dbus-hci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/dbus-hci.c') diff --git a/src/dbus-hci.c b/src/dbus-hci.c index 5118ffc8..290bbfd6 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -916,7 +916,8 @@ proceed: adapter_set_state(adapter, state); } -void hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer) +void hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer, + uint8_t key_type, uint8_t old_key_type) { char peer_addr[18]; struct btd_device *device; @@ -938,7 +939,7 @@ void hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer) if (!device_is_connected(device)) device_set_secmode3_conn(device, TRUE); - else if (!device_is_bonding(device, NULL)) + else if (!device_is_bonding(device, NULL) && old_key_type == 0xFF) hcid_dbus_bonding_process_complete(local, peer, 0); } -- cgit