OSDN Git Service

telephony-ofono: fix not being able to answer alerting/waiting calls
authorLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Wed, 5 Jan 2011 15:59:39 +0000 (17:59 +0200)
committerJohan Hedberg <johan.hedberg@nokia.com>
Thu, 6 Jan 2011 22:35:35 +0000 (00:35 +0200)
audio/telephony-ofono.c

index babf38f..4f69673 100644 (file)
@@ -263,9 +263,16 @@ void telephony_terminate_call_req(void *telephony_device)
 
 void telephony_answer_call_req(void *telephony_device)
 {
-       struct voice_call *vc = find_vc_with_status(CALL_STATUS_INCOMING);
+       struct voice_call *vc;
        int ret;
 
+       vc = find_vc_with_status(CALL_STATUS_INCOMING);
+       if (!vc)
+               vc = find_vc_with_status(CALL_STATUS_ALERTING);
+
+       if (!vc)
+               vc = find_vc_with_status(CALL_STATUS_WAITING);
+
        if (!vc) {
                telephony_answer_call_rsp(telephony_device,
                                        CME_ERROR_NOT_ALLOWED);