summaryrefslogtreecommitdiffstats
path: root/src/sim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim.c')
-rw-r--r--src/sim.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sim.c b/src/sim.c
index 62139836..03041c7b 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1374,7 +1374,8 @@ static void sim_set_ready(struct ofono_sim *sim)
if (sim == NULL)
return;
- if (sim->state != OFONO_SIM_STATE_INSERTED)
+ if (sim->state != OFONO_SIM_STATE_INSERTED &&
+ sim->state != OFONO_SIM_STATE_LOCKED_OUT)
return;
sim->state = OFONO_SIM_STATE_READY;
@@ -2385,9 +2386,8 @@ static void sim_pin_query_cb(const struct ofono_error *error,
/* Force the sim state out of READY */
sim_free_main_state(sim);
- sim->state = OFONO_SIM_STATE_INSERTED;
- __ofono_modem_sim_reset(
- __ofono_atom_get_modem(sim->atom));
+ sim->state = OFONO_SIM_STATE_LOCKED_OUT;
+ call_state_watches(sim);
}
break;
}