fix(bt/bluedroid): Fix the process of sending OK in ATD and COPS cmds

This commit is contained in:
wanglai@espressif.com 2023-08-21 17:43:00 +08:00 committed by gongyantao
parent e989d9eb32
commit 768e15afc5
3 changed files with 3 additions and 2 deletions

View File

@ -620,6 +620,9 @@ esp_err_t esp_hf_ag_reject_call(esp_bd_addr_t remote_addr, int num_active, int n
*
* @brief Initiate a call from AG.
* As a precondition to use this API, Service Level Connection shall exist with HFP client.
* If the AG is driven by the HF to call esp_hf_ag_out_call, it needs to response an OK or ERROR
* to HF. But if the AG is actively calling esp_hf_ag_out_call, it does not need to take a response
* to HF.
*
* @param[in] remote_addr: remote bluetooth device address
* @param[in] num_active: the number of active call

View File

@ -1522,7 +1522,6 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
if (p_result->data.ok_flag != BTA_AG_OK_ERROR) {
if (p_result->data.str[0] != 0) {
bta_ag_send_result(p_scb, code, p_result->data.str, 0);
bta_ag_send_ok(p_scb);
}
if (p_result->data.ok_flag == BTA_AG_OK_DONE) {
bta_ag_send_ok(p_scb);

View File

@ -1510,7 +1510,6 @@ void btc_hf_cb_handler(btc_msg_t *msg)
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, &param);
send_indicator_update(BTA_AG_IND_CALLSETUP,BTA_AG_CALLSETUP_OUTGOING);
osi_free(param.out_call.num_or_loc);
} else if (event == BTA_AG_AT_BLDN_EVT) { //dial_last
memcpy(param.out_call.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t));