diff options
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c index 926d9591..df68639d 100644 --- a/src/device.c +++ b/src/device.c @@ -1816,9 +1816,24 @@ DBusMessage *device_create_bonding(struct btd_device *device, return NULL; } +void device_simple_pairing_complete(struct btd_device *device, uint8_t status) +{ + struct authentication_req *auth = device->authr; + + if (auth && auth->type == AUTH_TYPE_NOTIFY && auth->agent) + agent_cancel(auth->agent); + + g_free(auth); + device->authr = NULL; +} + void device_bonding_complete(struct btd_device *device, uint8_t status) { struct bonding_req *bonding = device->bonding; + struct authentication_req *auth = device->authr; + + if (auth && auth->type == AUTH_TYPE_NOTIFY && auth->agent) + agent_cancel(auth->agent); if (status) goto failed; |