Fix LE device found event 31/180631/2
authorAtul Rai <a.rai@samsung.com>
Thu, 31 May 2018 10:09:29 +0000 (15:39 +0530)
committerAtul Rai <a.rai@samsung.com>
Thu, 31 May 2018 10:30:57 +0000 (16:00 +0530)
Issue: Paired devices are not detected during LE scan while
paired device is advertising
This patch fixes this issue.

Change-Id: I1b9f06c3d057204cb01fe88faedaa5ace399c26b
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
Signed-off-by: Atul Rai <a.rai@samsung.com>
src/adapter.c

index 656f91d..3c1002e 100644 (file)
@@ -1180,9 +1180,6 @@ struct btd_device *btd_adapter_find_device(struct btd_adapter *adapter,
        struct device_addr_type addr;
        struct btd_device *device;
        GSList *list;
-#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
-       bool exact_match = false;
-#endif
 
        if (!adapter)
                return NULL;
@@ -1195,22 +1192,16 @@ struct btd_device *btd_adapter_find_device(struct btd_adapter *adapter,
                                                device_addr_type_strict_cmp);
        if (list) {
                device = list->data;
-               exact_match = true;
+               return device;
        }
-#else
+#endif
        list = g_slist_find_custom(adapter->devices, &addr,
                                                        device_addr_type_cmp);
-#endif
        if (!list)
                return NULL;
 
        device = list->data;
 
-#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
-       if (exact_match)
-               return device;
-#endif
-
        /*
         * If we're looking up based on public address and the address
         * was not previously used over this bearer we may need to