From 7400b14ee61bf3de03aa6f477a6500f2bcb33c91 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 15 Mar 2012 12:49:44 +0100 Subject: mmcli: fix looking for unexisting SMS We need to ensure we iterate over all modems available. --- cli/mmcli-common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cli/mmcli-common.c') 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); -- cgit v1.2.3-70-g09d2