summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-02-25 16:41:33 -0500
committerDan Winship <danw@gnome.org>2014-05-19 08:24:54 -0400
commitc48ba1ab10035759054da2ec54eb7b613415d8ab (patch)
tree621357263de37ef13c42d2c105d04f3fd965fcbc
parent1f22c8859a2753d1430818104c019f9fdd7c364d (diff)
downloadNetworkManager-c48ba1ab10035759054da2ec54eb7b613415d8ab.tar.gz
devices: fix "slaves" property notification in release_slaves
Bond, bridge, and team were notifying their "slaves" properties before the slave actually got removed from priv->slaves, meaning that anything that looked at the property directly from a notify::slaves handler would see the old value. Fix that.
-rw-r--r--src/devices/nm-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 29e05288f3..1f5fb718d3 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -956,6 +956,7 @@ nm_device_release_one_slave (NMDevice *dev, NMDevice *slave)
info = find_slave_info (dev, slave);
if (!info)
return FALSE;
+ priv->slaves = g_slist_remove (priv->slaves, info);
if (info->enslaved) {
success = NM_DEVICE_GET_CLASS (dev)->release_slave (dev, slave);
@@ -968,7 +969,6 @@ nm_device_release_one_slave (NMDevice *dev, NMDevice *slave)
reason = priv->state_reason;
nm_device_slave_notify_release (info->slave, reason);
- priv->slaves = g_slist_remove (priv->slaves, info);
free_slave_info (info);
/* Ensure the device's hardware address is up-to-date; it often changes