mmcli: fix looking for unexisting bearers
We need to ensure we iterate over all modems available.
This commit is contained in:
+6
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user