component/bt:move the bugfix/ble_set_rand_addr_bug here for fix the conflict with the master

This commit is contained in:
Yulong 2017-04-14 02:45:07 -04:00
parent 3026eda86a
commit cb5c296829
2 changed files with 9 additions and 3 deletions

View file

@ -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)
{
BOOLEAN set_flag = false;
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);
return;
}
//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.");
}
}

View file

@ -861,9 +861,12 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
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);
break;
case BTC_GAP_BLE_ACT_SET_RAND_ADDRESS:
btc_ble_set_rand_addr(arg->set_rand_addr.rand_addr);
case BTC_GAP_BLE_ACT_SET_RAND_ADDRESS: {
BD_ADDR bd_addr;
memcpy(bd_addr, arg->set_rand_addr.rand_addr, sizeof(BD_ADDR));
btc_ble_set_rand_addr(bd_addr);
break;
}
case BTC_GAP_BLE_ACT_CONFIG_LOCAL_PRIVACY:
btc_ble_config_local_privacy(arg->cfg_local_privacy.privacy_enable);
break;