aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/mmcli-modem-3gpp.c4
-rw-r--r--cli/mmcli-modem-cdma.c4
-rw-r--r--cli/mmcli-modem-location.c4
-rw-r--r--cli/mmcli-modem-messaging.c4
-rw-r--r--cli/mmcli-modem-time.c4
5 files changed, 10 insertions, 10 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);
}
diff --git a/cli/mmcli-modem-cdma.c b/cli/mmcli-modem-cdma.c
index 00979a42..77df70cf 100644
--- a/cli/mmcli-modem-cdma.c
+++ b/cli/mmcli-modem-cdma.c
@@ -108,8 +108,8 @@ context_free (Context *ctx)
static void
ensure_modem_cdma (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);
}
diff --git a/cli/mmcli-modem-location.c b/cli/mmcli-modem-location.c
index 51382538..ed2b2f77 100644
--- a/cli/mmcli-modem-location.c
+++ b/cli/mmcli-modem-location.c
@@ -184,8 +184,8 @@ context_free (Context *ctx)
static void
ensure_modem_location (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);
}
diff --git a/cli/mmcli-modem-messaging.c b/cli/mmcli-modem-messaging.c
index f717552c..3c62408b 100644
--- a/cli/mmcli-modem-messaging.c
+++ b/cli/mmcli-modem-messaging.c
@@ -120,8 +120,8 @@ context_free (Context *ctx)
static void
ensure_modem_messaging (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);
}
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);
}