mmcli: fix looking for unexisting SMS

We need to ensure we iterate over all modems available.
This commit is contained in:
Aleksander Morgado
2012-03-15 12:49:44 +01:00
parent 6dea9964be
commit 7400b14ee6

View File

@@ -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);