send ring indicator from hfp_run_for_context

This commit is contained in:
Milanka Ringwald 2015-11-20 13:10:30 +01:00
parent 294ca9850f
commit 1c655401bf

View File

@ -667,12 +667,6 @@ static int incoming_call_state_machine(hfp_connection_t * context){
if (!context->run_call_state_machine) return 0;
if (context->state < HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED) return 0;
if (context->ag_ring){
context->ag_ring = 0;
hfp_ag_ring(context->rfcomm_cid);
return 1;
}
int done = 0;
switch (context->call_state){
case HFP_CALL_TRIGGER_AUDIO_CONNECTION:
@ -953,6 +947,13 @@ static void hfp_run_for_context(hfp_connection_t *context){
hfp_ag_error(context->rfcomm_cid);
return;
}
if (context->ag_ring){
context->ag_ring = 0;
context->command = HFP_CMD_NONE;
hfp_ag_ring(context->rfcomm_cid);
return;
}
int done = hfp_ag_run_for_context_service_level_connection(context);
if (!done){