diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2023-10-26 10:54:17 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2023-10-27 11:34:26 +0200 |
commit | 1f9a04268f6de7e9aa11073f0bf363aadc2ca29b (patch) | |
tree | 64519e385d67a5a9353681ddd39b15e979d5ead0 /src/mm-base-bearer.c | |
parent | 9569b99f4197ca4de57a97840a573304389fbc11 (diff) |
core: ensure all errors returned in DBus operations are normalized
We want to ensure that all errors reported via DBus operations are
normalized to MM-specific errors.
We don't want to return QMI or MBIM specific errors, as those are
protocol specific and we don't want DBus clients to need to rely on
knowing which is the protocol in use by the device.
Diffstat (limited to 'src/mm-base-bearer.c')
-rw-r--r-- | src/mm-base-bearer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mm-base-bearer.c b/src/mm-base-bearer.c index c93c0504..3f39ffb6 100644 --- a/src/mm-base-bearer.c +++ b/src/mm-base-bearer.c @@ -1127,7 +1127,7 @@ handle_connect_ready (MMBaseBearer *self, GError *error = NULL; if (!mm_base_bearer_connect_finish (self, res, &error)) - g_dbus_method_invocation_take_error (ctx->invocation, error); + mm_dbus_method_invocation_take_error (ctx->invocation, error); else mm_gdbus_bearer_complete_connect (MM_GDBUS_BEARER (self), ctx->invocation); @@ -1142,7 +1142,7 @@ handle_connect_auth_ready (MMBaseModem *modem, GError *error = NULL; if (!mm_base_modem_authorize_finish (modem, res, &error)) { - g_dbus_method_invocation_take_error (ctx->invocation, error); + mm_dbus_method_invocation_take_error (ctx->invocation, error); handle_connect_context_free (ctx); return; } @@ -1319,7 +1319,7 @@ handle_disconnect_ready (MMBaseBearer *self, GError *error = NULL; if (!mm_base_bearer_disconnect_finish (self, res, &error)) - g_dbus_method_invocation_take_error (ctx->invocation, error); + mm_dbus_method_invocation_take_error (ctx->invocation, error); else mm_gdbus_bearer_complete_disconnect (MM_GDBUS_BEARER (self), ctx->invocation); @@ -1334,7 +1334,7 @@ handle_disconnect_auth_ready (MMBaseModem *modem, GError *error = NULL; if (!mm_base_modem_authorize_finish (modem, res, &error)) { - g_dbus_method_invocation_take_error (ctx->invocation, error); + mm_dbus_method_invocation_take_error (ctx->invocation, error); handle_disconnect_context_free (ctx); return; } |