aboutsummaryrefslogtreecommitdiff
path: root/src/mm-generic-gsm.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-03-16 17:19:21 -0700
committerDan Williams <dcbw@redhat.com>2010-03-16 17:19:21 -0700
commit2c65e0ceaa40f103d9176f483469e38455bdba1c (patch)
tree7caf15405fe2f7451b2983aa2df0c77039bf5868 /src/mm-generic-gsm.c
parent79bca53f21abcb4ec22e41e0f21b2af2df9d830a (diff)
gsm: ignore SIM-PUK2 unlock required
Device is functional without it; it's only required for stuff we don't do yet.
Diffstat (limited to 'src/mm-generic-gsm.c')
-rw-r--r--src/mm-generic-gsm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c
index f888d9d3..a7e51661 100644
--- a/src/mm-generic-gsm.c
+++ b/src/mm-generic-gsm.c
@@ -884,9 +884,11 @@ enable (MMModem *modem,
GError *error = NULL;
const char *unlock;
- /* If the device needs a PIN, deal with that now */
+ /* If the device needs a PIN, deal with that now, but we don't care
+ * about SIM-PUK2 since the device is operational without it.
+ */
unlock = mm_modem_base_get_unlock_required (MM_MODEM_BASE (modem));
- if (unlock) {
+ if (unlock && strcmp (unlock, "sim-puk2")) {
MMCallbackInfo *info;
info = mm_callback_info_new (modem, callback, user_data);
@@ -3088,9 +3090,11 @@ simple_state_machine (MMModem *modem, GError *error, gpointer user_data)
case SIMPLE_STATE_CHECK_PIN:
next_state = SIMPLE_STATE_ENABLE;
- /* If we need a PIN, send it now */
+ /* If we need a PIN, send it now, but we don't care about SIM-PUK2
+ * since the device is operational without it.
+ */
unlock = mm_modem_base_get_unlock_required (MM_MODEM_BASE (modem));
- if (unlock) {
+ if (unlock && strcmp (unlock, "sim-puk2")) {
gboolean success = FALSE;
if (!strcmp (unlock, "sim-pin")) {