summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-11-26 12:31:23 +0100
committerThomas Haller <thaller@redhat.com>2019-11-26 12:40:13 +0100
commit812ad586dde52db3990b965cea333e9d59343089 (patch)
treec65ae26c8348e09831a03ad2ad8cd2c66248da7d
parent2078acfddc5400e77ae556e2f21403c1d5258f3d (diff)
downloadNetworkManager-812ad586dde52db3990b965cea333e9d59343089.tar.gz
libnm: fix assertion for cleaning up nml_dbus_property_o_notify()
Usually, the nmobj never gets reused for one dbobj. That means, we really don't expect a nml_dbus_property_o_notify() for a property that was already cleared. However, that is for example not the case with NMClient itself. As NetworkManager gets restarted, the name owner gets lost, the property cleared but afterwards it might get notified again. That means, nml_dbus_property_o_notify() and nml_dbus_property_o_clear() must work well together, otherwise a sequence of nml_dbus_property_o_notify() nml_dbus_property_o_clear() nml_dbus_property_o_notify() leads to an assertion failure "nm_assert (!pr_o->is_ready)". Fixes: ce0e898fb476 ('libnm: refactor caching of D-Bus objects in NMClient')
-rw-r--r--libnm/nm-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
index 3a718b2aa9..2330c4f4a4 100644
--- a/libnm/nm-client.c
+++ b/libnm/nm-client.c
@@ -1718,7 +1718,7 @@ nml_dbus_property_o_clear (NMLDBusPropertyO *pr_o,
pr_o->owner_dbobj = NULL;
pr_o->meta_iface = NULL;
pr_o->dbus_property_idx = 0;
- pr_o->is_ready = TRUE;
+ pr_o->is_ready = FALSE;
}
void