aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-09-26 18:42:49 +0200
committerAleksander Morgado <aleksander@aleksander.es>2019-10-17 10:51:50 +0200
commit4a0de586dbf6c0c268eadd6c8ff506ba38420e18 (patch)
tree658384d386d446605c995f8a6d03c810a880b854
parent2c0281aac9430731766cd4203c638848b9434633 (diff)
base-call: if start() fails, always terminated
-rw-r--r--src/mm-base-call.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mm-base-call.c b/src/mm-base-call.c
index 40dd6edd..c01ef463 100644
--- a/src/mm-base-call.c
+++ b/src/mm-base-call.c
@@ -206,6 +206,7 @@ handle_start_auth_ready (MMBaseModem *modem,
GError *error = NULL;
if (!mm_base_modem_authorize_finish (modem, res, &error)) {
+ mm_base_call_change_state (ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_UNKNOWN);
g_dbus_method_invocation_take_error (ctx->invocation, error);
handle_start_context_free (ctx);
return;
@@ -227,6 +228,7 @@ handle_start_auth_ready (MMBaseModem *modem,
/* Disallow non-emergency calls when in emergency-only state */
if (!mm_iface_modem_voice_authorize_outgoing_call (MM_IFACE_MODEM_VOICE (modem), ctx->self, &error)) {
+ mm_base_call_change_state (ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_UNKNOWN);
g_dbus_method_invocation_take_error (ctx->invocation, error);
handle_start_context_free (ctx);
return;
@@ -235,6 +237,7 @@ handle_start_auth_ready (MMBaseModem *modem,
/* Check if we do support doing it */
if (!MM_BASE_CALL_GET_CLASS (ctx->self)->start ||
!MM_BASE_CALL_GET_CLASS (ctx->self)->start_finish) {
+ mm_base_call_change_state (ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_UNKNOWN);
g_dbus_method_invocation_return_error (ctx->invocation,
MM_CORE_ERROR,
MM_CORE_ERROR_UNSUPPORTED,