Fix : ADV_IND data is not present while le scanning 64/101564/1 submit/tizen_3.0/20161202.001922
authorInjun Yang <injun.yang@samsung.com>
Thu, 1 Dec 2016 11:55:43 +0000 (20:55 +0900)
committerInjun Yang <injun.yang@samsung.com>
Thu, 1 Dec 2016 11:55:43 +0000 (20:55 +0900)
[Problem] While LE scanning, ADV_IND data is not present
[Cause & Measure] ADV_IND data is not delivered to application
[Checking Method] LE scan

Change-Id: I1c85c9877153290288822b8305c50323781dfe56
Signed-off-by: Injun Yang <injun.yang@samsung.com>
bt-service/bt-service-event-receiver.c

index 4dcd32f..489c26c 100644 (file)
@@ -2189,12 +2189,13 @@ void _bt_handle_device_event(GVariant *msg, const char *member, const char *path
 
                if (le_dev_info->adv_type != BT_LE_ADV_SCAN_RSP) {       /* ADV_IND */
                        adv_info = g_malloc0(sizeof(bt_le_adv_info_t));
-
                        adv_info->addr = g_strdup(le_dev_info->address);
                        adv_info->addr_type = le_dev_info->addr_type;
                        adv_info->rssi = le_dev_info->rssi;
                        adv_info->data_len = le_dev_info->adv_data_len;
                        adv_info->data = g_malloc0(le_dev_info->adv_data_len);
+                       memcpy(adv_info->data, le_dev_info->adv_data,
+                                       le_dev_info->adv_data_len);
 
                        if (__bt_add_adv_ind_info(adv_info) == 0) {
                                adv_info->timer_id = g_timeout_add(1000,