Skip to content

Commit c3af6db

Browse files
committed
fix(ble/bluedroid): Fixed BLE set adv param check
1 parent 095a0dd commit c3af6db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/bt/host/bluedroid/stack/btm/btm_ble_gap.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,12 @@ void BTM_BleUpdateAdvFilterPolicy(tBTM_BLE_AFP adv_policy)
388388
&p_cb->adv_addr_type);
389389
}
390390

391+
uint8_t null_addr[BD_ADDR_LEN] = {0};
392+
if ((p_cb->evt_type == 0x01 || p_cb->evt_type == 0x04) && memcmp(p_addr_ptr, null_addr, BD_ADDR_LEN) == 0) {
393+
/* directed advertising */
394+
return;
395+
}
396+
391397
btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min :
392398
BTM_BLE_GAP_ADV_SLOW_INT),
393399
(UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max :

0 commit comments

Comments
 (0)