From 3bcea1a15207016f6c85ac713e8a7cda51951017 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 9 Jan 2013 13:02:39 +0200 Subject: [PATCH] core: Fix canceling all types of agent requests When we get a bonding complete we should take care to cancel any kind of potential pending agent requests. This can (and will) particularly occur if there are multiple mgmt sockets around and some other mgmt socket responded to the authentication request. --- src/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 61c25f4d7..1ee747e45 100644 --- a/src/device.c +++ b/src/device.c @@ -3478,8 +3478,7 @@ void device_bonding_complete(struct btd_device *device, uint8_t status) DBG("bonding %p status 0x%02x", bonding, status); - if (auth && (auth->type == AUTH_TYPE_NOTIFY_PASSKEY - || auth->type == AUTH_TYPE_NOTIFY_PINCODE) && auth->agent) + if (auth && auth->agent) agent_cancel(auth->agent); if (status) { -- 2.47.3