aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlo Lobrano <c.lobrano@gmail.com>2016-05-13 17:15:20 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-07-26 14:07:37 +0200
commit43d97a46233e65eb5d13a38b4fe4d70b6725e904 (patch)
tree20249ac685814d52f153930f760b1af4945c41d0 /src
parentdce9f056738d151e81070188f4312f11758411be (diff)
iface-modem: inverted steps in update_lock_info_context_step
Inverted steps UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES and UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK. Soon after the unlock, the SIM can be busy and loading unlock retries might fail. When implemented, let run "after unlock" logic before any other step in update lock info, when SIM is not locked this change does not have any effect since "after unlock" is not executed.
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index f0d826c9..30fe20da 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -2907,8 +2907,8 @@ update_unlock_retries (MMIfaceModem *self,
typedef enum {
UPDATE_LOCK_INFO_CONTEXT_STEP_FIRST = 0,
UPDATE_LOCK_INFO_CONTEXT_STEP_LOCK,
- UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES,
UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK,
+ UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES,
UPDATE_LOCK_INFO_CONTEXT_STEP_LAST
} UpdateLockInfoContextStep;
@@ -3074,20 +3074,6 @@ update_lock_info_context_step (UpdateLockInfoContext *ctx)
/* Fall down to next step */
ctx->step++;
- case UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES:
- /* Load unlock retries if possible */
- if (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_retries &&
- MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_retries_finish) {
- MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_retries (
- ctx->self,
- (GAsyncReadyCallback)load_unlock_retries_ready,
- ctx);
- return;
- }
-
- /* Fall down to next step */
- ctx->step++;
-
case UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK:
/* If we get that no lock is required, run the after SIM unlock step
* in order to wait for the SIM to get ready. Skip waiting on
@@ -3113,6 +3099,20 @@ update_lock_info_context_step (UpdateLockInfoContext *ctx)
/* Fall down to next step */
ctx->step++;
+ case UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES:
+ /* Load unlock retries if possible */
+ if (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_retries &&
+ MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_retries_finish) {
+ MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->load_unlock_retries (
+ ctx->self,
+ (GAsyncReadyCallback)load_unlock_retries_ready,
+ ctx);
+ return;
+ }
+
+ /* Fall down to next step */
+ ctx->step++;
+
case UPDATE_LOCK_INFO_CONTEXT_STEP_LAST:
if (ctx->saved_error) {
/* Return saved error */