diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-03 12:15:07 -0800 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-03 12:19:00 -0800 |
commit | e35dd0c0246236371269b79cc28b1a23f4999560 (patch) | |
tree | 59d611de1106fc3db522ac998e73234035a2c855 /src/dbus-hci.c | |
parent | f7d1ee361e410e096929bd3918178af356c50bbd (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/dbus-hci.c')
-rw-r--r-- | src/dbus-hci.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c index 8059478d..7950ce79 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -445,6 +445,31 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, device_bonding_complete(device, status); } +void hcid_dbus_simple_pairing_complete(bdaddr_t *local, bdaddr_t *peer, + uint8_t status) +{ + struct btd_adapter *adapter; char peer_addr[18]; + struct btd_device *device; + + debug("hcid_dbus_simple_pairing_complete: status=%02x", status); + + adapter = manager_find_adapter(local); + if (!adapter) { + error("Unable to find matching adapter"); + return; + } + + ba2str(peer, peer_addr); + + device = adapter_find_device(adapter, peer_addr); + if (!device) { + error("Unable to get device object!"); + return; + } + + device_simple_pairing_complete(device, status); +} + void hcid_dbus_inquiry_start(bdaddr_t *local) { struct btd_adapter *adapter; |