diff options
-rw-r--r-- | src/applet-device-broadband.c | 6 | ||||
-rw-r--r-- | src/main.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c index 66ae9a5e..79a518cf 100644 --- a/src/applet-device-broadband.c +++ b/src/applet-device-broadband.c @@ -35,6 +35,8 @@ #include "mobile-helpers.h" #include "mb-menu-item.h" +extern gboolean auto_unlock_sim; + typedef struct { NMApplet *applet; NMDevice *device; @@ -435,6 +437,10 @@ modem_get_sim_ready (MMModem *modem, if (mm_modem_get_state (info->mm_modem) != MM_MODEM_STATE_LOCKED) return; + /* Do nothing if auto-unlocking feature is disabled */ + if (!auto_unlock_sim) + return; + /* If we have a device ID ask the keyring for any saved SIM-PIN codes */ if (mm_modem_get_device_identifier (info->mm_modem) && mm_modem_get_unlock_required (info->mm_modem) == MM_MODEM_LOCK_SIM_PIN) { @@ -39,6 +39,7 @@ static GMainLoop *loop = NULL; gboolean shell_debug = FALSE; gboolean with_agent = TRUE; +gboolean auto_unlock_sim = TRUE; static void usage (const char *progname) @@ -68,6 +69,8 @@ int main (int argc, char *argv[]) shell_debug = TRUE; if (!strcmp (argv[i], "--no-agent")) with_agent = FALSE; + if (!strcmp (argv[i], "--no-auto-unlock-sim")) + auto_unlock_sim = FALSE; } bindtextdomain (GETTEXT_PACKAGE, NMALOCALEDIR); |