From 7e70911074fbe281ebd27b673666287bac0f222e Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 9 Sep 2020 11:00:10 +0200 Subject: [PATCH] cinterion: failure to set low power in initial EPS setting is fatal Attempting to change the initial EPS bearer settings while in full functionality mode shouldn't happen, so make sure we don't attempt to do that if going into low power mode fails. --- plugins/cinterion/mm-broadband-modem-cinterion.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.c b/plugins/cinterion/mm-broadband-modem-cinterion.c index 2df65340..61f2f82b 100644 --- a/plugins/cinterion/mm-broadband-modem-cinterion.c +++ b/plugins/cinterion/mm-broadband-modem-cinterion.c @@ -1127,15 +1127,16 @@ set_initial_eps_rf_off_ready (MMBaseModem *self, GAsyncResult *res, GTask *task) { - g_autoptr(GError) error = NULL; + GError *error = NULL; SetInitialEpsContext *ctx; ctx = (SetInitialEpsContext *) g_task_get_task_data (task); if (!mm_base_modem_at_command_finish (self, res, &error)) { mm_obj_warn (self, "couldn't set RF off: %s", error->message); - if (!ctx->error) - ctx->error = g_steal_pointer (&error); + g_task_return_error (task, error); + g_object_unref (task); + return; } /* Go to next step */