From dc1df5bf2fb00b9eda0e98f59bb783c895fdeebf Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 17 Feb 2012 10:52:28 +0100 Subject: iface-modem-simple: SIM-PIN2 locking does not prevent from connecting --- src/mm-iface-modem-simple.c | 7 +++++-- src/mm-iface-modem.c | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mm-iface-modem-simple.c b/src/mm-iface-modem-simple.c index f0365d6e..b112472a 100644 --- a/src/mm-iface-modem-simple.c +++ b/src/mm-iface-modem-simple.c @@ -360,8 +360,11 @@ unlock_check_ready (MMIfaceModem *self, return; } - /* If we are already unlocked, go on to next step */ - if (lock == MM_MODEM_LOCK_NONE) { + /* If we are already unlocked, go on to next step. Note that we do also + * allow SIM-PIN2, as we don't need to unlock that in order to get + * connected. */ + if (lock == MM_MODEM_LOCK_NONE || + lock == MM_MODEM_LOCK_SIM_PIN2) { ctx->step++; connection_step (ctx); return; diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index a6e1968c..95c600de 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -1712,7 +1712,9 @@ set_lock_status (MMIfaceModem *self, if (lock == MM_MODEM_LOCK_NONE || lock == MM_MODEM_LOCK_SIM_PIN2 || lock == MM_MODEM_LOCK_SIM_PUK2) { - if (old_lock != MM_MODEM_LOCK_NONE) { + if (old_lock != MM_MODEM_LOCK_NONE && + old_lock != MM_MODEM_LOCK_SIM_PIN2 && + old_lock != MM_MODEM_LOCK_SIM_PUK2) { /* Notify transition from UNKNOWN/LOCKED to DISABLED */ mm_iface_modem_update_state (self, MM_MODEM_STATE_DISABLED, -- cgit v1.2.3-70-g09d2