Handling BLE scan as per Adv type 29/221229/1
authorinjun.yang <injun.yang@samsung.com>
Mon, 30 Dec 2019 07:50:53 +0000 (16:50 +0900)
committerinjun.yang <injun.yang@samsung.com>
Mon, 30 Dec 2019 07:50:53 +0000 (16:50 +0900)
Change-Id: I85e5f6078c589a03d53937e30f27958bad3ef200

bt-oal/bluez_hal/src/bt-hal-gatt.c

index f756a2f..bd15768 100644 (file)
@@ -768,10 +768,18 @@ static void __bt_hal_handle_gatt_client_scan_result(void *buf, uint16_t len)
                return;
        }
 #endif
-       if (__bt_hal_add_adv_ind_info(adv_info))
-               adv_info->timer_id = g_timeout_add(1000,
-                               __bt_hal_adv_scan_req_timeout_cb,
-                               (void *)adv_info);
+
+       if (adv_info->adv_type == BT_LE_ADV_DIRECT_IND ||
+               adv_info->adv_type == BT_LE_ADV_NONCONN_IND) {
+               __bt_hal_send_le_scan_result_event(adv_info);
+       } else if (adv_info->adv_type == BT_LE_ADV_IND ||
+               adv_info->adv_type == BT_LE_ADV_SCAN_IND) {
+
+               if (__bt_hal_add_adv_ind_info(adv_info))
+                       adv_info->timer_id = g_timeout_add(1000,
+                                       __bt_hal_adv_scan_req_timeout_cb,
+                                       (void *)adv_info);
+       }
 }
 
 /*******************************************************************************