core: update NMManager:devices before emitting notify::devices (bgo #728367)

This commit is contained in:
Dan Winship 2014-04-17 12:11:38 -04:00
parent 3f6ed554c5
commit 2f1cfaf41f
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From acb6a0d305dddccb6d73575c88aefad60faa173a Mon Sep 17 00:00:00 2001
From: Dan Winship <danw@gnome.org>
Date: Thu, 27 Mar 2014 12:16:46 -0400
Subject: [PATCH] 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?)
---
src/nm-manager.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nm-manager.c b/src/nm-manager.c
index be2f118..48ce061 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -752,12 +752,12 @@ remove_device (NMManager *manager, NMDevice *device)
g_signal_handlers_disconnect_matched (device, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, manager);
nm_settings_device_removed (priv->settings, device);
+ 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);
}
--
1.9.0

View File

@ -42,7 +42,7 @@ Name: NetworkManager
Summary: Network connection manager and user applications
Epoch: 1
Version: 0.9.9.0
Release: 37%{snapshot}%{?dist}
Release: 38%{snapshot}%{?dist}
Group: System Environment/Base
License: GPLv2+
URL: http://www.gnome.org/projects/NetworkManager/
@ -112,6 +112,7 @@ Patch58: 0058-rh1086132-NM-crash-fix-wifi-ap-utils.patch
Patch59: 0059-rh1056133-fix-modem-enable-crash.patch
Patch60: 0060-rh1055099-secondary-connections-state.patch
Patch61: 0061-rh1076469-fix-crash-teamdctl-cli-fini.patch
Patch62: 0062-bgo728367-devices-property.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -338,6 +339,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
%patch59 -p1 -b .0059-rh1056133-fix-modem-enable-crash.orig
%patch60 -p1 -b .0060-rh1055099-secondary-connections-state.orig
%patch61 -p1 -b .0061-rh1076469-fix-crash-teamdctl-cli-fini.orig
%patch62 -p1 -b .0062-bgo728367-devices-property.orig
%build
@ -562,6 +564,9 @@ fi
%endif
%changelog
* Thu Apr 17 2014 Dan Winship <danw@redhat.com> - 0.9.9.0-38.git20131003
- core: update NMManager:devices before emitting notify::devices (bgo #728367)
* Tue Apr 15 2014 Jiří Klimeš <jklimes@redhat.com> - 0.9.9.0-37.git20131003
- policy: check device state before changing it for secondaries (rh #1055099)
- team: fix crash in teamdctl (rh #1076469)