diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 4a14d33d..68242e5c 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -10154,7 +10154,9 @@ initialize_step (InitializeContext *ctx) return; case INITIALIZE_STEP_SIM_HOT_SWAP: - { + /* Create the SIM hot swap ports context only if not already done before + * (we may be re-running the initialization step after SIM-PIN unlock) */ + if (!ctx->self->priv->sim_hot_swap_ports_ctx) { gboolean is_sim_hot_swap_supported = FALSE; g_object_get (ctx->self, @@ -10165,7 +10167,7 @@ initialize_step (InitializeContext *ctx) PortsContext *ports; GError *error = NULL; - mm_dbg ("Creating PortsContext for SIM hot swap."); + mm_dbg ("Creating ports context for SIM hot swap"); ports = g_new0 (PortsContext, 1); ports->ref_count = 1; @@ -10178,7 +10180,9 @@ initialize_step (InitializeContext *ctx) ports_context_unref (ports); } - } + } else + mm_dbg ("Ports context for SIM hot swap already available"); + /* Fall down to next step */ ctx->step++; |