mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/rb_ble_set_rand_addr' into 'master'
move the bugfix/ble_set_rand_addr_bug here for fix the conflict with the master move the bugfix/ble_set_rand_addr_bug to here avoid the conflict with the master See merge request !669
This commit is contained in:
commit
4ba62a6b45
@ -4472,12 +4472,15 @@ void bta_dm_ble_update_conn_params (tBTA_DM_MSG *p_data)
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
void bta_dm_ble_set_rand_address(tBTA_DM_MSG *p_data)
|
void bta_dm_ble_set_rand_address(tBTA_DM_MSG *p_data)
|
||||||
{
|
{
|
||||||
|
BOOLEAN set_flag = false;
|
||||||
if (p_data->set_addr.addr_type != BLE_ADDR_RANDOM) {
|
if (p_data->set_addr.addr_type != BLE_ADDR_RANDOM) {
|
||||||
APPL_TRACE_ERROR("Invalid random adress type = %d\n", p_data->set_addr.addr_type);
|
APPL_TRACE_ERROR("Invalid random adress type = %d\n", p_data->set_addr.addr_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//send the setting random address to BTM layer
|
//send the setting random address to BTM layer
|
||||||
BTM_BleSetRandAddress(p_data->set_addr.address);
|
if ((set_flag = BTM_BleSetRandAddress(p_data->set_addr.address) != TRUE)){
|
||||||
|
APPL_TRACE_ERROR("%s,set random address fail.", __func__);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -861,9 +861,12 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
|
|||||||
case BTC_GAP_BLE_ACT_SET_PKT_DATA_LEN:
|
case BTC_GAP_BLE_ACT_SET_PKT_DATA_LEN:
|
||||||
btc_ble_set_pkt_data_len(arg->set_pkt_data_len.remote_device, arg->set_pkt_data_len.tx_data_length);
|
btc_ble_set_pkt_data_len(arg->set_pkt_data_len.remote_device, arg->set_pkt_data_len.tx_data_length);
|
||||||
break;
|
break;
|
||||||
case BTC_GAP_BLE_ACT_SET_RAND_ADDRESS:
|
case BTC_GAP_BLE_ACT_SET_RAND_ADDRESS: {
|
||||||
btc_ble_set_rand_addr(arg->set_rand_addr.rand_addr);
|
BD_ADDR bd_addr;
|
||||||
|
memcpy(bd_addr, arg->set_rand_addr.rand_addr, sizeof(BD_ADDR));
|
||||||
|
btc_ble_set_rand_addr(bd_addr);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case BTC_GAP_BLE_ACT_CONFIG_LOCAL_PRIVACY:
|
case BTC_GAP_BLE_ACT_CONFIG_LOCAL_PRIVACY:
|
||||||
btc_ble_config_local_privacy(arg->cfg_local_privacy.privacy_enable);
|
btc_ble_config_local_privacy(arg->cfg_local_privacy.privacy_enable);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user