diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-25 09:25:18 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-25 11:43:45 +0200 |
commit | 001f35234e16d7aeb2ed1282ba3b57aea73c5a9e (patch) | |
tree | 8eef7185f09135bf4f012587713e59cfe6b3d9f4 /cli/mmcli-modem-time.c | |
parent | c6c1e0fb50569b9eafd92ba170a8dba42c4948be (diff) |
cli: ensure modem is enabled when performing actions
Don't rely on the lock status, as the modem may say it requires SIM PIN 2, but
we're allowed to run most operations even with that unlock required.
Diffstat (limited to 'cli/mmcli-modem-time.c')
-rw-r--r-- | cli/mmcli-modem-time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/mmcli-modem-time.c b/cli/mmcli-modem-time.c index 7bc277c6..d17c1dee 100644 --- a/cli/mmcli-modem-time.c +++ b/cli/mmcli-modem-time.c @@ -108,8 +108,8 @@ context_free (Context *ctx) static void ensure_modem_time (void) { - if (mm_modem_get_unlock_required (mm_object_peek_modem (ctx->object)) != MM_MODEM_LOCK_NONE) { - g_printerr ("error: modem not unlocked yet\n"); + if (mm_modem_get_state (mm_object_peek_modem (ctx->object)) < MM_MODEM_STATE_ENABLED) { + g_printerr ("error: modem not enabled yet\n"); exit (EXIT_FAILURE); } |