hci: fill non-significant part of LE Advertisement Data with zeroes

This commit is contained in:
Matthias Ringwald 2017-07-21 10:47:49 +02:00
parent 60b111ade4
commit 7a85e4f523

View File

@ -2949,7 +2949,10 @@ static void hci_run(void){
}
if (hci_stack->le_advertisements_todo & LE_ADVERTISEMENT_TASKS_SET_ADV_DATA){
hci_stack->le_advertisements_todo &= ~LE_ADVERTISEMENT_TASKS_SET_ADV_DATA;
hci_send_cmd(&hci_le_set_advertising_data, hci_stack->le_advertisements_data_len, hci_stack->le_advertisements_data);
uint8_t adv_data_clean[31];
memset(adv_data_clean, 0, sizeof(adv_data_clean));
memcpy(adv_data_clean, hci_stack->le_advertisements_data, hci_stack->le_advertisements_data_len);
hci_send_cmd(&hci_le_set_advertising_data, hci_stack->le_advertisements_data_len, adv_data_clean);
return;
}
if (hci_stack->le_advertisements_todo & LE_ADVERTISEMENT_TASKS_SET_SCAN_DATA){