mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-03 13:38:04 +02:00
libnm/nm-object: gracefully skip unknown objects
They indicate a server bug (a dangling path of an object that does not exist). The best we can do probably is to just ignore them and warn. Based-on-patch-by: Dan Williams <dcbw@redhat.com>
This commit is contained in:
parent
9d31d09bcb
commit
32d60ccc6f
1 changed files with 7 additions and 10 deletions
|
|
@ -639,19 +639,16 @@ handle_object_array_property (NMObject *self, const char *property_name, GVarian
|
|||
while (g_variant_iter_next (&iter, "&o", &path)) {
|
||||
gs_unref_object GDBusObject *object = NULL;
|
||||
|
||||
if (!strcmp (path, "/")) {
|
||||
/* FIXME: can't happen? */
|
||||
continue;
|
||||
}
|
||||
|
||||
object = g_dbus_object_manager_get_object (priv->object_manager, path);
|
||||
if (!object) {
|
||||
if (object) {
|
||||
obj = g_object_get_qdata (G_OBJECT (object), _nm_object_obj_nm_quark ());
|
||||
object_created (obj, path, odata);
|
||||
} else {
|
||||
g_warning ("no object known for %s\n", path);
|
||||
return FALSE;
|
||||
odata->remaining--;
|
||||
odata->length--;
|
||||
object_property_maybe_complete (self);
|
||||
}
|
||||
|
||||
obj = g_object_get_qdata (G_OBJECT (object), _nm_object_obj_nm_quark ());
|
||||
object_created (obj, path, odata);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue