aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2022-05-20 12:58:05 +0200
committerAleksander Morgado <aleksander@aleksander.es>2022-05-25 10:59:17 +0200
commit1b30d10ad172dd9dfc95b5d97e1ee487b77d5a16 (patch)
tree340dc90fa105da945080ddef3bdea18dc0c595e3
parentac3f9be3d37f908ed3795ba661b74d745733fcb4 (diff)
base-sim: don't reload properties that may have been already initialized
If we created the SIM objects during the SIM slots processing, we should not attempt to reload the settings that were already set during the re-initialization, as that may end up clearing the initial properties.
-rw-r--r--src/mm-base-sim.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mm-base-sim.c b/src/mm-base-sim.c
index 05ce05dd..20955e05 100644
--- a/src/mm-base-sim.c
+++ b/src/mm-base-sim.c
@@ -2568,7 +2568,8 @@ interface_initialization_step (GTask *task)
/* Fall through */
case INITIALIZATION_STEP_PREFERRED_NETWORKS:
- if (MM_BASE_SIM_GET_CLASS (self)->load_preferred_networks &&
+ if (mm_gdbus_sim_get_preferred_networks (MM_GDBUS_SIM (self)) == NULL &&
+ MM_BASE_SIM_GET_CLASS (self)->load_preferred_networks &&
MM_BASE_SIM_GET_CLASS (self)->load_preferred_networks_finish) {
MM_BASE_SIM_GET_CLASS (self)->load_preferred_networks (
self,
@@ -2580,7 +2581,8 @@ interface_initialization_step (GTask *task)
/* Fall through */
case INITIALIZATION_STEP_SIM_TYPE:
- if (MM_BASE_SIM_GET_CLASS (self)->load_sim_type &&
+ if (mm_gdbus_sim_get_sim_type (MM_GDBUS_SIM (self)) == MM_SIM_TYPE_UNKNOWN &&
+ MM_BASE_SIM_GET_CLASS (self)->load_sim_type &&
MM_BASE_SIM_GET_CLASS (self)->load_sim_type_finish) {
MM_BASE_SIM_GET_CLASS (self)->load_sim_type (
self,
@@ -2592,7 +2594,8 @@ interface_initialization_step (GTask *task)
/* Fall through */
case INITIALIZATION_STEP_ESIM_STATUS:
- if (MM_BASE_SIM_GET_CLASS (self)->load_esim_status &&
+ if (mm_gdbus_sim_get_esim_status (MM_GDBUS_SIM (self)) == MM_SIM_ESIM_STATUS_UNKNOWN &&
+ MM_BASE_SIM_GET_CLASS (self)->load_esim_status &&
MM_BASE_SIM_GET_CLASS (self)->load_esim_status_finish) {
MM_BASE_SIM_GET_CLASS (self)->load_esim_status (
self,
@@ -2604,7 +2607,8 @@ interface_initialization_step (GTask *task)
/* Fall through */
case INITIALIZATION_STEP_REMOVABILITY:
- if (MM_BASE_SIM_GET_CLASS (self)->load_removability &&
+ if (mm_gdbus_sim_get_removability (MM_GDBUS_SIM (self)) == MM_SIM_REMOVABILITY_UNKNOWN &&
+ MM_BASE_SIM_GET_CLASS (self)->load_removability &&
MM_BASE_SIM_GET_CLASS (self)->load_removability_finish) {
MM_BASE_SIM_GET_CLASS (self)->load_removability (
self,