summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-03-27 12:16:46 -0400
committerDan Winship <danw@gnome.org>2014-03-27 12:16:46 -0400
commitacb6a0d305dddccb6d73575c88aefad60faa173a (patch)
tree9c83f67154703f13b2710210da4b60bb85089d58
parent4dba720d8c883549e57a292a236c8ea44e1e0bca (diff)
downloadNetworkManager-acb6a0d305dddccb6d73575c88aefad60faa173a.tar.gz
core: update NMManager:devices before emitting notify::devices (rh #1078720)
NMClient's "devices" property was getting out of sync because the daemon was emitting "notify" before actually changing the property value. This resulted in problems with re-activating virtual devices that had previously been deactivated in gnome-control-center and anaconda. (And probably gnome-shell and nm-applet?)
-rw-r--r--src/nm-manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index be2f11846a..48ce061a74 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -765,12 +765,12 @@ remove_device (NMManager *manager, NMDevice *device, gboolean quitting)
g_signal_handlers_disconnect_matched (device, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, manager);
nm_settings_device_removed (priv->settings, device, quitting);
+ priv->devices = g_slist_remove (priv->devices, device);
+
g_signal_emit (manager, signals[DEVICE_REMOVED], 0, device);
g_object_notify (G_OBJECT (manager), NM_MANAGER_DEVICES);
g_object_unref (device);
- priv->devices = g_slist_remove (priv->devices, device);
-
if (priv->startup)
check_if_startup_complete (manager);
}