summaryrefslogtreecommitdiffstats
path: root/src/voicecall.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/voicecall.c')
-rw-r--r--src/voicecall.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/voicecall.c b/src/voicecall.c
index 8e20e24d..b16b6f23 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -331,6 +331,16 @@ static DBusMessage *voicecall_deflect(DBusConnection *conn,
return NULL;
}
+static void dial_request_user_cancel(struct ofono_voicecall *vc,
+ struct voicecall *call)
+{
+ if (!vc->dial_req)
+ return;
+
+ if (!call || call == vc->dial_req->call)
+ dial_request_finish(vc->dial_req->call->vc, TRUE);
+}
+
static DBusMessage *voicecall_hangup(DBusConnection *conn,
DBusMessage *msg, void *data)
{
@@ -342,6 +352,8 @@ static DBusMessage *voicecall_hangup(DBusConnection *conn,
if (vc->pending)
return __ofono_error_busy(msg);
+ dial_request_user_cancel(vc, v);
+
switch (call->status) {
case CALL_STATUS_DISCONNECTED:
return __ofono_error_failed(msg);
@@ -1253,6 +1265,8 @@ static DBusMessage *manager_hangup_all(DBusConnection *conn,
} else
vc->driver->hangup_all(vc, generic_callback, vc);
+ dial_request_user_cancel(vc, NULL);
+
return NULL;
}