diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-06-14 12:19:26 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2018-10-16 17:09:21 +0000 |
commit | 60d42de68e3a359d2eb0af3d3ca01ca48f3c53c6 (patch) | |
tree | d1fafccb57f7f5e64076647829d9f0d16a0ddea5 /src/mm-iface-modem-voice.c | |
parent | 9503af95e2d22b828c3dcf89c1d63e3dd823cbc2 (diff) |
base-call: no need to delete call info from the device
Call information only lives in the ModemManager logic, there is no
associated date stored within the device itself. Therefore, simplify
everything by assuming there is nothing to remove.
Looks like this logic was implemented because it was originally based
on the SMS management logic, but for SMS we do have to remove
them (the stored PDU parts) from the device.
Diffstat (limited to 'src/mm-iface-modem-voice.c')
-rw-r--r-- | src/mm-iface-modem-voice.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/mm-iface-modem-voice.c b/src/mm-iface-modem-voice.c index e9669f2a..eabb0681 100644 --- a/src/mm-iface-modem-voice.c +++ b/src/mm-iface-modem-voice.c @@ -230,21 +230,6 @@ handle_delete_context_free (HandleDeleteContext *ctx) } static void -handle_delete_ready (MMCallList *list, - GAsyncResult *res, - HandleDeleteContext *ctx) -{ - GError *error = NULL; - - if (!mm_call_list_delete_call_finish (list, res, &error)) - g_dbus_method_invocation_take_error (ctx->invocation, error); - else - mm_gdbus_modem_voice_complete_delete_call (ctx->skeleton, ctx->invocation); - - handle_delete_context_free (ctx); -} - -static void handle_delete_auth_ready (MMBaseModem *self, GAsyncResult *res, HandleDeleteContext *ctx) @@ -267,7 +252,7 @@ handle_delete_auth_ready (MMBaseModem *self, g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE, - "Cannot delete CALL: device not yet enabled"); + "Cannot delete call: device not yet enabled"); handle_delete_context_free (ctx); return; } @@ -279,15 +264,17 @@ handle_delete_auth_ready (MMBaseModem *self, g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE, - "Cannot delete CALL: missing CALL list"); + "Cannot delete call: missing call list"); handle_delete_context_free (ctx); return; } - mm_call_list_delete_call (list, - ctx->path, - (GAsyncReadyCallback)handle_delete_ready, - ctx); + if (!mm_call_list_delete_call (list, ctx->path, &error)) + g_dbus_method_invocation_take_error (ctx->invocation, error); + else + mm_gdbus_modem_voice_complete_delete_call (ctx->skeleton, ctx->invocation); + + handle_delete_context_free (ctx); g_object_unref (list); } |