core: unregister removed devices from D-Bus

Instead of waiting until the device is disposed and dbus-glib does
it for us, remove them when the Manager is done with them.  If
something (like pending D-Bus calls) holds a reference to the device
when the Manager removes it, the device would previously still
service method calls until all references are released.  When
the device is removed, it's dead, and it shouldn't be exported
anymore.
This commit is contained in:
Dan Williams
2014-04-09 12:31:08 -05:00
parent 88fcf17ce0
commit 79a7e46bfd

View File

@@ -769,6 +769,8 @@ remove_device (NMManager *manager, NMDevice *device, gboolean quitting)
g_signal_emit (manager, signals[DEVICE_REMOVED], 0, device);
g_object_notify (G_OBJECT (manager), NM_MANAGER_DEVICES);
nm_dbus_manager_unregister_object (priv->dbus_mgr, device);
g_object_unref (device);
if (priv->startup)