Handling non-flag adv data 00/101000/1
authorInjun Yang <injun.yang@samsung.com>
Wed, 30 Nov 2016 05:21:58 +0000 (14:21 +0900)
committerInjun Yang <injun.yang@samsung.com>
Wed, 30 Nov 2016 05:21:58 +0000 (14:21 +0900)
[Problem] Unable to find scan result which have non flag adv data
[Cause & Measure] Even though the adv flag field is not included,
  deliver it to bt service. Same with android behavior
[Checking Method] BLE Scanning

Change-Id: Ifbc85bedbe3edb38c5a2f0f588465ffc2ca07fcc
Signed-off-by: Injun Yang <injun.yang@samsung.com>
src/adapter.c

index 62b8b2f..52184ce 100644 (file)
@@ -9809,7 +9809,11 @@ static void update_found_devices(struct btd_adapter *adapter,
 {
        struct btd_device *dev;
        struct eir_data eir_data;
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
        bool name_known, discoverable;
+#else
+       bool name_known;
+#endif
 #ifdef TIZEN_FEATURE_PLATFROM_SCAN_FILTER
        uint8_t allow_report;
 #endif
@@ -9817,12 +9821,12 @@ static void update_found_devices(struct btd_adapter *adapter,
 
        memset(&eir_data, 0, sizeof(eir_data));
        eir_parse(&eir_data, data, data_len);
-
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
        if (bdaddr_type == BDADDR_BREDR)
                discoverable = true;
        else
                discoverable = eir_data.flags & (EIR_LIM_DISC | EIR_GEN_DISC);
-
+#endif
        ba2str(bdaddr, addr);
 
 #ifdef TIZEN_FEATURE_PLATFROM_SCAN_FILTER
@@ -9846,8 +9850,8 @@ static void update_found_devices(struct btd_adapter *adapter,
                /*DBG("List BREDR:%p LE:%p Discoverable:%d", adapter->discovery_list,
                        adapter->le_discovery_list, discoverable);*/
                if ((adapter->discovery_list == NULL &&
-                               adapter->le_discovery_list == NULL) || !discoverable) {
-                               DBG("discovery list is NULL");
+                               adapter->le_discovery_list == NULL)) {
+                       DBG("discovery list is NULL");
                        eir_data_free(&eir_data);
                        return;
                }