voicecall: Fix emulator AT+CHUP for HFP
authorFrédéric Danis <frederic.danis@linux.intel.com>
Thu, 9 Feb 2012 09:12:34 +0000 (10:12 +0100)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 9 Feb 2012 20:21:51 +0000 (14:21 -0600)
AT+CHUP should be able to hang-up active or incoming calls

src/voicecall.c

index 094f41d..e224d3a 100644 (file)
@@ -2931,7 +2931,8 @@ static void emulator_chup_cb(struct ofono_emulator *em,
                        goto done;
                }
 
-               if (voicecalls_have_active(vc) == FALSE)
+               if (voicecalls_have_active(vc) == FALSE &&
+                               voicecalls_have_incoming(vc) == FALSE)
                        goto fail;
 
                vc->pending_em = em;