mmcli: fix looking for unexisting bearers

We need to ensure we iterate over all modems available.
This commit is contained in:
Aleksander Morgado
2012-03-16 14:53:25 +01:00
parent 979c520381
commit 6dea9964be
+6 -2
View File
@@ -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);