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-3gpp.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-3gpp.c')
-rw-r--r-- | cli/mmcli-modem-3gpp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/mmcli-modem-3gpp.c b/cli/mmcli-modem-3gpp.c index 75b8ee14..22323eda 100644 --- a/cli/mmcli-modem-3gpp.c +++ b/cli/mmcli-modem-3gpp.c @@ -161,8 +161,8 @@ context_free (Context *ctx) static void ensure_modem_3gpp (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); } |