diff options
author | Dan Williams <dan@ioncontrol.co> | 2025-05-01 15:09:46 -0500 |
---|---|---|
committer | Dan Williams <dan@ioncontrol.co> | 2025-05-01 15:15:29 -0500 |
commit | febab17f07f54f8ababed9b5e187e189ccd15841 (patch) | |
tree | fdc2b7ee9375abe11af39c76a89604af9e50b428 /src | |
parent | 8ef4ce4d61bcd71f7406bcd42d8294b29afc373e (diff) |
broadband-modem: reload registration info after manual registration
This refreshes operator information after manual registration. QMI and
MBIM implementations return operator info along with registration info
so they handle this easily, while with AT-based devices we must run
additional commands to retrieve that after the manual registration has
finished.
Suggested by: Kirill Buksha <kirill.buksha@axians.rs>
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/971
Signed-off-by: Dan Williams <dan@ioncontrol.co>
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 70562774..31012d26 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -5587,6 +5587,21 @@ modem_3gpp_run_registration_checks_finish (MMIfaceModem3gpp *self, return g_task_propagate_boolean (G_TASK (res), error); } +static void +run_registration_checks_reload_current_registration_info_ready (MMIfaceModem3gpp *modem, + GAsyncResult *res, + GTask *task) +{ + GError *error = NULL; + + mm_iface_modem_3gpp_reload_current_registration_info_finish (modem, res, &error); + if (error) + g_task_return_error (task, error); + else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + static void run_registration_checks_context_step (GTask *task); static void @@ -5828,13 +5843,17 @@ run_registration_checks_context_step (GTask *task) error = g_steal_pointer (&ctx->error_cs); else g_assert_not_reached (); - } - if (error) g_task_return_error (task, error); - else - g_task_return_boolean (task, TRUE); - g_object_unref (task); + g_object_unref (task); + return; + } + + /* When everything is done, recheck operator info as it may have changed */ + mm_iface_modem_3gpp_reload_current_registration_info ( + MM_IFACE_MODEM_3GPP (self), + (GAsyncReadyCallback)run_registration_checks_reload_current_registration_info_ready, + task); } static void |