iface-modem: don't reconfigure sim hot swap context on SIM PIN unlock

If we had already successfully run the sim hot swap context setup
during the initial initialization, make sure we don't re-run on SIM
PIN unlock, because we may be re-creating signal handlers and such.
This commit is contained in:
Aleksander Morgado
2020-09-14 16:15:47 +00:00
parent ab4160afa6
commit af5c242e92
+9 -3
View File
@@ -5334,8 +5334,14 @@ interface_initialization_step (GTask *task)
ctx->step++;
/* fall-through */
case INITIALIZATION_STEP_SIM_HOT_SWAP:
if (MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap &&
case INITIALIZATION_STEP_SIM_HOT_SWAP: {
gboolean sim_hot_swap_configured = FALSE;
g_object_get (self,
MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, &sim_hot_swap_configured,
NULL);
if (!sim_hot_swap_configured &&
MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap &&
MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish) {
MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap (
MM_IFACE_MODEM (self),
@@ -5344,7 +5350,7 @@ interface_initialization_step (GTask *task)
return;
}
ctx->step++;
/* fall-through */
} /* fall-through */
case INITIALIZATION_STEP_SIM_SLOTS:
/* If the modem doesn't need any SIM (not implemented by plugin, or not