From e7d3f79a144b0a92618862e056b455e6b53b9614 Mon Sep 17 00:00:00 2001 From: Atul Rai Date: Wed, 14 Mar 2018 17:20:29 +0530 Subject: [PATCH] Fixed removal of LE devices on stopping LE scan Issue: LE connect fail with error "Device path not found". Cause: Device flags are incorrectly updated to 0 on receiving scan_response data. Later on stopping LE scan, the LE device is considered non-connectable based on device flag which was incorrectly updated to 0 during scan_response event and the device is removed immediately. This causes LE connect to fail with error "device path not found". Solution: This patch fixes the issue by checking adv pkt type before updating the device flag on device found event. Change-Id: Id86b024dfc6c980780aef6cdda8e6dcc6b150b80 Signed-off-by: Atul Rai --- src/adapter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index 4511a32..7382247 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -10379,8 +10379,13 @@ static void update_found_devices(struct btd_adapter *adapter, if (eir_data.sd_list) device_set_service_data(dev, eir_data.sd_list, duplicate); +#ifdef TIZEN_FEATURE_BLUEZ_MODIFY + if (bdaddr_type != BDADDR_BREDR && adv_type != ADV_TYPE_SCAN_RESPONSE) + device_set_flags(dev, eir_data.flags); +#else if (bdaddr_type != BDADDR_BREDR) device_set_flags(dev, eir_data.flags); +#endif eir_data_free(&eir_data); -- 2.7.4