aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/mmcli-common.c')
-rw-r--r--cli/mmcli-common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/mmcli-common.c b/cli/mmcli-common.c
index db1e06ab..bc0365cb 100644
--- a/cli/mmcli-common.c
+++ b/cli/mmcli-common.c
@@ -340,8 +340,6 @@ find_bearer_in_list (GList *list,
}
}
- g_printerr ("error: couldn't find bearer at '%s'\n", bearer_path);
- exit (EXIT_FAILURE);
return NULL;
}
@@ -518,6 +516,12 @@ mmcli_get_bearer_sync (GDBusConnection *connection,
g_object_unref (modem);
}
+ if (!found) {
+ g_printerr ("error: couldn't find bearer at '%s': 'not found in any modem'\n",
+ bearer_path);
+ exit (EXIT_FAILURE);
+ }
+
g_list_free_full (modems, (GDestroyNotify) g_object_unref);
g_free (bearer_path);