hci: reset context ok_pending + command

This commit is contained in:
Matthias Ringwald 2025-03-14 16:36:59 +01:00
parent 26594b9fc1
commit 52ad570876
2 changed files with 6 additions and 5 deletions

View File

@ -604,11 +604,7 @@ static void hfp_reset_voice_recognition(hfp_connection_t * hfp_connection){
}
void hfp_reset_context_flags(hfp_connection_t * hfp_connection){
if (!hfp_connection) return;
hfp_connection->ok_pending = 0;
hfp_connection->command = HFP_CMD_NONE;
hfp_connection->change_status_update_for_individual_ag_indicators = 0;
hfp_connection->change_status_update_for_individual_ag_indicators = 0;
hfp_connection->enable_extended_audio_gateway_error_report = 0;
hfp_connection->extended_audio_gateway_error = 0;
@ -637,6 +633,9 @@ static hfp_connection_t * create_hfp_connection_context(void){
hfp_connection->acl_handle = HCI_CON_HANDLE_INVALID;
hfp_connection->sco_handle = HCI_CON_HANDLE_INVALID;
hfp_connection->ok_pending = 0;
hfp_connection->command = HFP_CMD_NONE;
// parser
hfp_connection->found_equal_sign = false;

View File

@ -1447,6 +1447,8 @@ static void hfp_hf_handle_rfcomm_command(hfp_connection_t * hfp_connection){
case HFP_CMD_AG_ACTIVATE_VOICE_RECOGNITION:
break;
case HFP_CMD_ERROR:
hfp_connection->ok_pending = 0;
hfp_connection->command = HFP_CMD_NONE;
switch (hfp_connection->state){
case HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED:
switch (hfp_connection->codecs_state){