From cb21b7f44227339a1252bc377fcc9fbb4bbfcaec Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 18 Aug 2011 19:28:40 -0500 Subject: 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. --- src/voicecall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3