diff options
author | Aleksander Morgado <aleksandermj@google.com> | 2022-07-29 15:05:01 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2022-07-29 15:07:45 +0200 |
commit | bda3ade5a8805eb31391c2c855374094680f3187 (patch) | |
tree | 6f207e0b5d037dd89e9bdd6b24808b58c3ba9b08 /src/mm-iface-modem.c | |
parent | dd51defd2be3aac7b31b67b4ae38677f98af1b76 (diff) |
iface-modem: reordering of ready methods in sync()
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r-- | src/mm-iface-modem.c | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 8a38a283..7e892d51 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -4503,42 +4503,6 @@ mm_iface_modem_sync_finish (MMIfaceModem *self, } static void -sync_sim_lock_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) -{ - SyncingContext *ctx; - g_autoptr (GError) error = NULL; - - ctx = g_task_get_task_data (task); - - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required_finish (self, res, &error)) - mm_obj_warn (self, "checking sim lock status failed: %s", error->message); - - /* Go on to next step */ - ctx->step++; - interface_syncing_step (task); -} - -static void -sync_detect_sim_swap_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) -{ - SyncingContext *ctx; - g_autoptr (GError) error = NULL; - - ctx = g_task_get_task_data (task); - - if (!mm_iface_modem_check_for_sim_swap_finish (self, res, &error)) - mm_obj_warn (self, "checking sim swap failed: %s", error->message); - - /* Go on to next step */ - ctx->step++; - interface_syncing_step (task); -} - -static void sync_all_bearers_ready (MMBearerList *bearer_list, GAsyncResult *res, GTask *task) @@ -4572,8 +4536,9 @@ reload_bearers (GTask *task) MM_IFACE_MODEM_BEARER_LIST, &bearer_list, NULL); + /* If no bearer list (e.g. none created or modem disabled), + * go on to next step */ if (!bearer_list) { - /* Go on to next step */ ctx->step++; interface_syncing_step (task); return; @@ -4585,6 +4550,42 @@ reload_bearers (GTask *task) } static void +sync_sim_lock_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + SyncingContext *ctx; + g_autoptr (GError) error = NULL; + + ctx = g_task_get_task_data (task); + + if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required_finish (self, res, &error)) + mm_obj_warn (self, "checking sim lock status failed: %s", error->message); + + /* Go on to next step */ + ctx->step++; + interface_syncing_step (task); +} + +static void +sync_detect_sim_swap_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + SyncingContext *ctx; + g_autoptr (GError) error = NULL; + + ctx = g_task_get_task_data (task); + + if (!mm_iface_modem_check_for_sim_swap_finish (self, res, &error)) + mm_obj_warn (self, "checking sim swap failed: %s", error->message); + + /* Go on to next step */ + ctx->step++; + interface_syncing_step (task); +} + +static void interface_syncing_step (GTask *task) { MMIfaceModem *self; |