diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 12:49:44 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 14:53:25 +0100 |
commit | 7400b14ee61bf3de03aa6f477a6500f2bcb33c91 (patch) | |
tree | b197ccb09f67632a5503e5f5b40b378f12a6e172 | |
parent | 6dea9964bec11ac168835afc397d4bef061cc4c1 (diff) |
mmcli: fix looking for unexisting SMS
We need to ensure we iterate over all modems available.
-rw-r--r-- | cli/mmcli-common.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/mmcli-common.c b/cli/mmcli-common.c index bc0365cb..ff02b572 100644 --- a/cli/mmcli-common.c +++ b/cli/mmcli-common.c @@ -825,8 +825,6 @@ find_sms_in_list (GList *list, } } - g_printerr ("error: couldn't find sms at '%s'\n", sms_path); - exit (EXIT_FAILURE); return NULL; } @@ -1014,6 +1012,12 @@ mmcli_get_sms_sync (GDBusConnection *connection, g_object_unref (modem); } + if (!found) { + g_printerr ("error: couldn't find SMS at '%s': 'not found in any modem'\n", + sms_path); + exit (EXIT_FAILURE); + } + g_list_free_full (modems, (GDestroyNotify) g_object_unref); g_free (sms_path); |