summary refs log tree commit diff
path: root/libnm/nm-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm/nm-client.c')
-rw-r--r--libnm/nm-client.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
index 2c775196..f1b25970 100644
--- a/libnm/nm-client.c
+++ b/libnm/nm-client.c
@@ -2930,11 +2930,15 @@ _dbus_handle_properties_changed(NMClient *      self,
         gs_free char *ss = NULL;
 
         NML_NMCLIENT_LOG_T(self,
-                           "[%s]: %s: properties changed for interface %s { %s }",
+                           "[%s]: %s: properties changed for interface %s %s%s%s",
                            object_path,
                            log_context,
                            interface_name,
-                           (ss = g_variant_print(changed_properties, TRUE)));
+                           NM_PRINT_FMT_QUOTED(changed_properties,
+                                               "{ ",
+                                               (ss = g_variant_print(changed_properties, TRUE)),
+                                               " }",
+                                               "(no changed properties)"));
     }
 
     if (inout_dbobj) {
@@ -2946,12 +2950,16 @@ _dbus_handle_properties_changed(NMClient *      self,
         dbobj     = _dbobjs_dbobj_get_r(self, dbus_path);
     }
 
-    if (dbobj)
+    if (dbobj) {
+        nm_assert(dbobj->obj_state >= NML_DBUS_OBJ_STATE_WATCHED_ONLY);
         db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, allow_add_iface);
-    else if (allow_add_iface) {
+        if (db_iface_data && dbobj->obj_state == NML_DBUS_OBJ_STATE_WATCHED_ONLY)
+            nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self);
+    } else if (allow_add_iface) {
         dbobj = _dbobjs_dbobj_create(self, g_steal_pointer(&dbus_path));
         nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self);
         db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, TRUE);
+        nm_assert(db_iface_data);
     }
 
     NM_SET_OUT(inout_dbobj, dbobj);