summaryrefslogtreecommitdiffstats
path: root/src/voicecall.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-08-18 19:28:40 -0500
committerDenis Kenzior <denkenz@gmail.com>2011-08-18 19:28:40 -0500
commitcb21b7f44227339a1252bc377fcc9fbb4bbfcaec (patch)
tree0ae32c4729848eb1bb923e7e82109c58d9a89124 /src/voicecall.c
parent236f1ffb36bf56efaefb99eb93e7b0eaa8be8650 (diff)
downloadofono-cb21b7f44227339a1252bc377fcc9fbb4bbfcaec.tar.bz2
voicecall: Relax reqs for hangup of held calls
If we have a single held call, then it should be possible to hang it up with 'Hangup' even if active calls exist. Only if multiple held calls or a waiting call exists should we disallow the request due to possible side-effects.
Diffstat (limited to 'src/voicecall.c')
-rw-r--r--src/voicecall.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/voicecall.c b/src/voicecall.c
index ec04f8d2..2b4c2092 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -587,7 +587,9 @@ static DBusMessage *voicecall_hangup(DBusConnection *conn,
return NULL;
case CALL_STATUS_HELD:
- if (single_call && vc->driver->release_all_held) {
+ if (vc->driver->release_all_held &&
+ voicecalls_num_held(vc) == 1 &&
+ voicecalls_have_waiting(vc) == FALSE) {
vc->pending = dbus_message_ref(msg);
vc->driver->release_all_held(vc, generic_callback, vc);