From 76384036b43f97e171ef189caae58226df35084a Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 13 Mar 2014 16:57:07 +0200 Subject: [PATCH] core: Fix storing device info in peripheral mode In peripheral mode the only proper trigger we have is the completion of (reverse) service discovery. This was already covered for the BR/EDR discovery completion so this patch moves the call to a common place used by both LE and BR/EDR. --- src/device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/device.c b/src/device.c index 46e881c8f..c06ee0bec 100644 --- a/src/device.c +++ b/src/device.c @@ -1571,6 +1571,9 @@ static void device_svc_resolved(struct btd_device *dev, uint8_t bdaddr_type, g_free(cb); } + if (!dev->temporary) + store_device_info(dev); + if (!req || !req->msg) return; @@ -3140,10 +3143,6 @@ static void search_cb(sdp_list_t *recs, int err, gpointer user_data) send_reply: device_svc_resolved(device, BDADDR_BREDR, err); - - if (!device->temporary) - store_device_info(device); - browse_request_free(req); } -- 2.47.3