mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Component/bt: fix build error when close SMP
This commit is contained in:
parent
8478823039
commit
064c274bd6
@ -2984,14 +2984,14 @@ void btm_send_sel_conn_callback(BD_ADDR remote_bda, UINT8 evt_type, UINT8 *p_dat
|
|||||||
void btm_ble_process_adv_pkt (UINT8 *p_data)
|
void btm_ble_process_adv_pkt (UINT8 *p_data)
|
||||||
{
|
{
|
||||||
BD_ADDR bda;
|
BD_ADDR bda;
|
||||||
BD_ADDR temp_bda;
|
|
||||||
UINT8 temp_addr_type = 0;
|
|
||||||
UINT8 evt_type = 0, *p = p_data;
|
UINT8 evt_type = 0, *p = p_data;
|
||||||
UINT8 addr_type = 0;
|
UINT8 addr_type = 0;
|
||||||
UINT8 num_reports;
|
UINT8 num_reports;
|
||||||
UINT8 data_len;
|
UINT8 data_len;
|
||||||
#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
|
#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
|
||||||
BOOLEAN match = FALSE;
|
BOOLEAN match = FALSE;
|
||||||
|
BD_ADDR temp_bda;
|
||||||
|
UINT8 temp_addr_type = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Only process the results if the inquiry is still active */
|
/* Only process the results if the inquiry is still active */
|
||||||
@ -3007,11 +3007,12 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
|
|||||||
STREAM_TO_UINT8 (evt_type, p);
|
STREAM_TO_UINT8 (evt_type, p);
|
||||||
STREAM_TO_UINT8 (addr_type, p);
|
STREAM_TO_UINT8 (addr_type, p);
|
||||||
STREAM_TO_BDADDR (bda, p);
|
STREAM_TO_BDADDR (bda, p);
|
||||||
temp_addr_type = addr_type;
|
|
||||||
memcpy(temp_bda, bda, BD_ADDR_LEN);
|
|
||||||
//BTM_TRACE_ERROR("btm_ble_process_adv_pkt:bda= %0x:%0x:%0x:%0x:%0x:%0x\n",
|
//BTM_TRACE_ERROR("btm_ble_process_adv_pkt:bda= %0x:%0x:%0x:%0x:%0x:%0x\n",
|
||||||
// bda[0],bda[1],bda[2],bda[3],bda[4],bda[5]);
|
// bda[0],bda[1],bda[2],bda[3],bda[4],bda[5]);
|
||||||
#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
|
#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
|
||||||
|
temp_addr_type = addr_type;
|
||||||
|
memcpy(temp_bda, bda, BD_ADDR_LEN);
|
||||||
|
|
||||||
/* map address to security record */
|
/* map address to security record */
|
||||||
match = btm_identity_addr_to_random_pseudo(bda, &addr_type, FALSE);
|
match = btm_identity_addr_to_random_pseudo(bda, &addr_type, FALSE);
|
||||||
|
|
||||||
@ -3023,6 +3024,7 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
btm_ble_process_adv_pkt_cont(bda, addr_type, evt_type, p);
|
btm_ble_process_adv_pkt_cont(bda, addr_type, evt_type, p);
|
||||||
|
#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
|
||||||
//save current adv addr information if p_dev_rec!= NULL
|
//save current adv addr information if p_dev_rec!= NULL
|
||||||
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bda);
|
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bda);
|
||||||
if(p_dev_rec) {
|
if(p_dev_rec) {
|
||||||
@ -3030,6 +3032,7 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
|
|||||||
memcpy(p_dev_rec->ble.current_addr, temp_bda, BD_ADDR_LEN);
|
memcpy(p_dev_rec->ble.current_addr, temp_bda, BD_ADDR_LEN);
|
||||||
p_dev_rec->ble.current_addr_valid = true;
|
p_dev_rec->ble.current_addr_valid = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
STREAM_TO_UINT8(data_len, p);
|
STREAM_TO_UINT8(data_len, p);
|
||||||
|
|
||||||
/* Advance to the next event data_len + rssi byte */
|
/* Advance to the next event data_len + rssi byte */
|
||||||
|
Loading…
Reference in New Issue
Block a user