From 724f400dd4090f26db44edfaba9ea09109467b5a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sat, 9 Apr 2016 21:32:52 +0200 Subject: [PATCH] hfp: avoid warnings about rfcomm_cid #0 --- src/classic/hfp_ag.c | 1 + src/classic/hfp_hf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/classic/hfp_ag.c b/src/classic/hfp_ag.c index 17b8166d5..7b1dbaed3 100644 --- a/src/classic/hfp_ag.c +++ b/src/classic/hfp_ag.c @@ -1611,6 +1611,7 @@ static void hfp_ag_send_call_status(hfp_connection_t * hfp_connection, int call_ static void hfp_run_for_context(hfp_connection_t *hfp_connection){ if (!hfp_connection) return; + if (!hfp_connection->rfcomm_cid) return; if (!rfcomm_can_send_packet_now(hfp_connection->rfcomm_cid)) { rfcomm_request_can_send_now_event(hfp_connection->rfcomm_cid); return; diff --git a/src/classic/hfp_hf.c b/src/classic/hfp_hf.c index 878f9ce97..7586bffca 100644 --- a/src/classic/hfp_hf.c +++ b/src/classic/hfp_hf.c @@ -584,6 +584,7 @@ static int call_setup_state_machine(hfp_connection_t * hfp_connection){ static void hfp_run_for_context(hfp_connection_t * hfp_connection){ if (!hfp_connection) return; + if (!hfp_connection->rfcomm_cid) return; if (!rfcomm_can_send_packet_now(hfp_connection->rfcomm_cid)) return; int done = hfp_hf_run_for_context_service_level_connection(hfp_connection);