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:
Jiang Jiang Jian 2017-04-14 15:17:29 +08:00
commit 4ba62a6b45
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.", __func__);
}
}

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;