mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 23:30:13 +01:00
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:
parent
88fcf17ce0
commit
79a7e46bfd
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue