From 8d31e79ac42a5a7df8fbef10cc5454f5a69515f0 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 26 Jul 2012 09:28:06 +0200 Subject: [PATCH] sim: getting SIM-PIN2 lock doesn't mean PIN sending failed --- src/mm-sim.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mm-sim.c b/src/mm-sim.c index 52446907..9cd31ccb 100644 --- a/src/mm-sim.c +++ b/src/mm-sim.c @@ -563,7 +563,11 @@ unlock_check_ready (MMIfaceModem *modem, MMModemLock lock; lock = mm_iface_modem_unlock_check_finish (modem, res, &error); - if (lock != MM_MODEM_LOCK_NONE) { + /* 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) { /* Device is locked. Now: * - If we got an error in the original send-pin action, report it. * - If we got an error in the pin-check action, report it.