aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-common.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-03-15 12:49:06 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-16 14:53:25 +0100
commit6dea9964bec11ac168835afc397d4bef061cc4c1 (patch)
treedfd22bd5ab4046d5fab854ec88cc722a9e06f495 /cli/mmcli-common.c
parent979c52038176ded90809c77ee7e97e0ddb665ebb (diff)
mmcli: fix looking for unexisting bearers
We need to ensure we iterate over all modems available.
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);