[PATCH] telephony-ofono: fix handling of telephony_key_press_req

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.dentz-von@xxxxxxxxx>

---
 audio/telephony-ofono.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c
index ef4ede7..6f5685b 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
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux