hfp_ag: fix reject of incoming call in setup state

This commit is contained in:
Milanka Ringwald 2022-06-02 14:53:56 +02:00
parent 5f5a28727d
commit f2aa99a916
2 changed files with 8 additions and 1 deletions

View File

@ -1740,6 +1740,7 @@ static void hfp_ag_call_sm(hfp_ag_call_event_t event, hfp_connection_t * hfp_con
case HFP_CALLSETUP_STATUS_NO_CALL_SETUP_IN_PROGRESS:
case HFP_CALLSETUP_STATUS_OUTGOING_CALL_SETUP_IN_DIALING_STATE:
case HFP_CALLSETUP_STATUS_OUTGOING_CALL_SETUP_IN_ALERTING_STATE:
case HFP_CALLSETUP_STATUS_INCOMING_CALL_SETUP_IN_PROGRESS:
hfp_gsm_handler(HFP_AG_TERMINATE_CALL_BY_AG, 0, 0, NULL);
hfp_ag_set_callsetup_indicator();
hfp_ag_trigger_reject_call();

View File

@ -496,7 +496,13 @@ void hfp_gsm_handler(hfp_ag_call_event_t event, uint8_t index, uint8_t type, con
case HFP_AG_TERMINATE_CALL_BY_AG:
set_callsetup_status(HFP_CALLSETUP_STATUS_NO_CALL_SETUP_IN_PROGRESS);
delete_call(current_call_index);
if (current_call_index != -1){
delete_call(current_call_index);
break;
}
if (initiated_call_index != -1){
delete_call(initiated_call_index);
}
break;
case HFP_AG_CALL_DROPPED: