From ddbb637bef641da953f24bf3da9589e4d03bff27 Mon Sep 17 00:00:00 2001 From: Milanka Ringwald Date: Fri, 20 Nov 2015 11:35:23 +0100 Subject: [PATCH] trigger callstatus indicator tranfer from gerenal ag sm --- src/hfp_ag.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hfp_ag.c b/src/hfp_ag.c index dbd86be0c..e1b8b223b 100644 --- a/src/hfp_ag.c +++ b/src/hfp_ag.c @@ -780,12 +780,18 @@ static int incoming_call_state_machine(hfp_connection_t * context){ } static void hfp_ag_trigger_incoming_call(void){ + int indicator_index = get_ag_indicator_index_for_name("callsetup"); + if (indicator_index < 0) return; + linked_list_iterator_t it; linked_list_iterator_init(&it, hfp_get_connections()); while (linked_list_iterator_has_next(&it)){ hfp_connection_t * connection = (hfp_connection_t *)linked_list_iterator_next(&it); hfp_ag_establish_service_level_connection(connection->remote_addr); - connection->run_call_state_machine = 1; + if (connection->call_state == HFP_CALL_IDLE){ + connection->run_call_state_machine = 1; + connection->ag_indicators_status_update_bitmap = store_bit(connection->ag_indicators_status_update_bitmap, indicator_index, 1); + } hfp_run_for_context(connection); } }