From 267521853247b2448b477c56dba4bd287480814e Mon Sep 17 00:00:00 2001 From: Lukasz Rymanowski Date: Thu, 20 Nov 2014 16:55:09 +0100 Subject: [PATCH] shared/hfp: Fix setting result pending flag Let's set result_pending flag only when we are waiting for result from upper layer. It will be used in following patch. --- src/shared/hfp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/hfp.c b/src/shared/hfp.c index 7ad6e4241..3b6175980 100644 --- a/src/shared/hfp.c +++ b/src/shared/hfp.c @@ -505,13 +505,13 @@ static void process_input(struct hfp_gw *hfp) *ptr = '\0'; } - hfp->result_pending = true; - if (!call_prefix_handler(hfp, str)) { - if (hfp->command_callback) + if (hfp->command_callback) { hfp->command_callback(str, hfp->command_data); - else + hfp->result_pending = true; + } else { hfp_gw_send_result(hfp, HFP_RESULT_ERROR); + } } len = ringbuf_drain(hfp->read_buf, count + 1); -- 2.47.3