From f29684ed924ec4646a93cb272de675611a7cf286 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 13 Mar 2014 16:55:30 +0200 Subject: [PATCH] core: Fix bonding complete detection in peripheral mode When we're in peripheral mode we're not guaranteed to get a master LTK, so use any LTK as a trigger to call bonding_complete. Multiple calls (in case of both slave and master LTK) are safely handled by the function. --- src/adapter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index 9f1fa4fd1..ce3a59bdc 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -5642,8 +5642,7 @@ static void new_long_term_key_callback(uint16_t index, uint16_t length, btd_device_set_temporary(device, FALSE); } - if (ev->key.master) - bonding_complete(adapter, &addr->bdaddr, addr->type, 0); + bonding_complete(adapter, &addr->bdaddr, addr->type, 0); } static void store_csrk(const bdaddr_t *local, const bdaddr_t *peer, -- 2.47.3