From a850fa911d10d6980707f7d915a2b8e4bb7bedd5 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 14 Mar 2025 10:22:33 +0100 Subject: [PATCH] hfp_hf: ohandle indicators only after SLC was established --- src/classic/hfp_hf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/classic/hfp_hf.c b/src/classic/hfp_hf.c index 22c2e2267..2fb835752 100644 --- a/src/classic/hfp_hf.c +++ b/src/classic/hfp_hf.c @@ -1354,6 +1354,9 @@ static void hfp_hf_emit_pending_ag_indicator_status_updates(hfp_connection_t * h static void hfp_hf_handle_transfer_ag_indicator_status(hfp_connection_t * hfp_connection) { uint16_t i; + // handle indicators only after SLC was established + if (hfp_connection->state < HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED) return; + for (i = 0; i < hfp_connection->ag_indicators_nr; i++){ if (strcmp(hfp_connection->ag_indicators[i].name, "callsetup") == 0){ hfp_callsetup_status_t new_hf_callsetup_status = (hfp_callsetup_status_t) hfp_connection->ag_indicators[i].status;