aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Mazur <mkm@semihalf.com>2021-04-20 11:31:39 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-05-22 23:56:22 +0000
commitc6b5045105a12098ddd8177f8a3c43d73e3f6680 (patch)
tree7539702da3d088f68cfaf533b63b27895b4b5729
parentdb5837d9b47f4de09f79f71bd5778874be81f58c (diff)
base-sim: ignore personalization locks after SIM unlock
-rw-r--r--src/mm-base-sim.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mm-base-sim.c b/src/mm-base-sim.c
index 87b300bd..59af3a88 100644
--- a/src/mm-base-sim.c
+++ b/src/mm-base-sim.c
@@ -593,11 +593,10 @@ update_lock_info_ready (MMIfaceModem *modem,
MMModemLock lock;
lock = mm_iface_modem_update_lock_info_finish (modem, res, &error);
- /* Even if we may be SIM-PIN2/PUK2 locked, we don't consider this an error
- * in the PIN/PUK sending */
- if (lock != MM_MODEM_LOCK_NONE &&
- lock != MM_MODEM_LOCK_SIM_PIN2 &&
- lock != MM_MODEM_LOCK_SIM_PUK2) {
+ /* Consider it only an error if SIM-PIN/PUK is locked or lock is unknown */
+ if (lock == MM_MODEM_LOCK_UNKNOWN ||
+ lock == MM_MODEM_LOCK_SIM_PIN ||
+ lock == MM_MODEM_LOCK_SIM_PUK) {
const GError *saved_error;
/* Device is locked. Now: