aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-09-11 10:21:03 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-09-14 16:15:47 +0000
commitaf5c242e9234a7061ec0d6624e3712153c7c2c6b (patch)
tree5e9e573db403cca4307e5fa4d66c8fcae296b203 /src
parentab4160afa676404859d4e9fdb751217cbff8a0bb (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index c7d92557..d35108ab 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -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