@@ -2984,14 +2984,14 @@ void btm_send_sel_conn_callback(BD_ADDR remote_bda, UINT8 evt_type, UINT8 *p_dat
29842984void btm_ble_process_adv_pkt (UINT8 * p_data )
29852985{
29862986 BD_ADDR bda ;
2987- BD_ADDR temp_bda ;
2988- UINT8 temp_addr_type = 0 ;
29892987 UINT8 evt_type = 0 , * p = p_data ;
29902988 UINT8 addr_type = 0 ;
29912989 UINT8 num_reports ;
29922990 UINT8 data_len ;
29932991#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE )
29942992 BOOLEAN match = FALSE;
2993+ BD_ADDR temp_bda ;
2994+ UINT8 temp_addr_type = 0 ;
29952995#endif
29962996
29972997 /* Only process the results if the inquiry is still active */
@@ -3007,11 +3007,12 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
30073007 STREAM_TO_UINT8 (evt_type , p );
30083008 STREAM_TO_UINT8 (addr_type , p );
30093009 STREAM_TO_BDADDR (bda , p );
3010- temp_addr_type = addr_type ;
3011- memcpy (temp_bda , bda , BD_ADDR_LEN );
30123010 //BTM_TRACE_ERROR("btm_ble_process_adv_pkt:bda= %0x:%0x:%0x:%0x:%0x:%0x\n",
30133011 // bda[0],bda[1],bda[2],bda[3],bda[4],bda[5]);
30143012#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE )
3013+ temp_addr_type = addr_type ;
3014+ memcpy (temp_bda , bda , BD_ADDR_LEN );
3015+
30153016 /* map address to security record */
30163017 match = btm_identity_addr_to_random_pseudo (bda , & addr_type , FALSE);
30173018
@@ -3023,13 +3024,15 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
30233024 } else
30243025#endif
30253026 btm_ble_process_adv_pkt_cont (bda , addr_type , evt_type , p );
3027+ #if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE )
30263028 //save current adv addr information if p_dev_rec!= NULL
30273029 tBTM_SEC_DEV_REC * p_dev_rec = btm_find_dev (bda );
30283030 if (p_dev_rec ) {
30293031 p_dev_rec -> ble .current_addr_type = temp_addr_type ;
30303032 memcpy (p_dev_rec -> ble .current_addr , temp_bda , BD_ADDR_LEN );
30313033 p_dev_rec -> ble .current_addr_valid = true;
30323034 }
3035+ #endif
30333036 STREAM_TO_UINT8 (data_len , p );
30343037
30353038 /* Advance to the next event data_len + rssi byte */
0 commit comments