From e3a27197820b503f16f39bf4071b65a4e5123b42 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 23 Mar 2011 17:42:07 +0200 Subject: [PATCH] telephony-ofono: fix handling of telephony_key_press_req --- audio/telephony-ofono.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c index ef4ede71c..6f5685b65 100644 --- a/audio/telephony-ofono.c +++ b/audio/telephony-ofono.c @@ -579,19 +579,17 @@ void telephony_nr_and_ec_req(void *telephony_device, gboolean enable) void telephony_key_press_req(void *telephony_device, const char *keys) { - struct voice_call *active, *waiting; + struct voice_call *active, *incoming; int err; DBG("telephony-ofono: got key press request for %s", keys); - waiting = find_vc_with_status(CALL_STATUS_INCOMING); - if (!waiting) - waiting = find_vc_with_status(CALL_STATUS_DIALING); + incoming = find_vc_with_status(CALL_STATUS_INCOMING); active = find_vc_with_status(CALL_STATUS_ACTIVE); - if (waiting) - err = answer_call(waiting); + if (incoming) + err = answer_call(incoming); else if (active) err = release_call(active); else -- 2.47.3