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.
This commit is contained in:
Denis Kenzior 2011-08-18 19:28:40 -05:00
parent 236f1ffb36
commit cb21b7f442
1 changed files with 3 additions and 1 deletions

View File

@ -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);