mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(bt/bluedroid): Fixed NULL Bluetooth device address in HF-AG events was reported to application layer
This commit is contained in:
parent
c1d8013330
commit
19185a65fd
@ -1368,6 +1368,7 @@ void btc_hf_cb_handler(btc_msg_t *msg)
|
||||
do {
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
param.vra_rep.value = p_data->val.num;
|
||||
memcpy(param.vra_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
btc_hf_cb_to_app(ESP_HF_BVRA_RESPONSE_EVT, ¶m);
|
||||
if (p_data->val.num) {
|
||||
btc_hf_connect_audio(&hf_local_param[idx].btc_hf_cb.connected_bda);
|
||||
@ -1463,9 +1464,12 @@ void btc_hf_cb_handler(btc_msg_t *msg)
|
||||
case BTA_AG_AT_BLDN_EVT:
|
||||
case BTA_AG_AT_D_EVT:
|
||||
{
|
||||
idx = p_data->hdr.handle - 1;
|
||||
CHECK_HF_IDX(idx);
|
||||
do {
|
||||
if (event == BTA_AG_AT_D_EVT) { // dial_number_or_memory
|
||||
memset(¶m, 0, sizeof(esp_hf_cb_param_t));
|
||||
memcpy(param.out_call.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));
|
||||
param.out_call.num_or_loc = osi_malloc((strlen(p_data->val.str) + 1) * sizeof(char));
|
||||
sprintf(param.out_call.num_or_loc, "%s", p_data->val.str);
|
||||
btc_hf_cb_to_app(ESP_HF_DIAL_EVT, ¶m);
|
||||
|
Loading…
Reference in New Issue
Block a user