[NetworkManager/f20] Fix connectivity property notification

Daniel Williams dcbw at fedoraproject.org
Wed Jul 2 16:06:53 UTC 2014


commit d358b2c4dddf7a8691a73a31c558e9a4b6bab376
Author: Dan Williams <dcbw at redhat.com>
Date:   Wed Jul 2 11:06:46 2014 -0500

    Fix connectivity property notification

 0071-fix-connectivity-notification.patch |   52 ++++++++++++++++++++++++++++++
 NetworkManager.spec                      |    2 +
 2 files changed, 54 insertions(+), 0 deletions(-)
---
diff --git a/0071-fix-connectivity-notification.patch b/0071-fix-connectivity-notification.patch
new file mode 100644
index 0000000..2bf6bb0
--- /dev/null
+++ b/0071-fix-connectivity-notification.patch
@@ -0,0 +1,52 @@
+From f6f216f0a96942aaaacea26ffb7af72aab86f38c Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <gcampagna at src.gnome.org>
+Date: Mon, 17 Feb 2014 15:41:04 +0100
+Subject: [PATCH] manager: fix notification of the connectivity property
+
+Notify DBus clients at the end of a connectivity check, and when
+NMConnectivity reports a change.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=724550
+---
+ src/nm-manager.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/nm-manager.c b/src/nm-manager.c
+index 8d37f4b..3ae48c8 100644
+--- a/src/nm-manager.c
++++ b/src/nm-manager.c
+@@ -643,14 +643,15 @@ checked_connectivity (GObject *object, GAsyncResult *result, gpointer user_data)
+ 		connectivity = nm_connectivity_check_finish (priv->connectivity, result, NULL);
+ 
+ 		if (connectivity == NM_CONNECTIVITY_FULL)
+ 			set_state (manager, NM_STATE_CONNECTED_GLOBAL);
+ 		else if (   connectivity == NM_CONNECTIVITY_PORTAL
+ 		         || connectivity == NM_CONNECTIVITY_LIMITED)
+ 			set_state (manager, NM_STATE_CONNECTED_SITE);
++		g_object_notify (G_OBJECT (manager), NM_MANAGER_CONNECTIVITY);
+ 	}
+ 
+ 	g_object_unref (manager);
+ }
+ 
+ static void
+ nm_manager_update_state (NMManager *manager)
+@@ -4286,14 +4287,15 @@ connectivity_changed (NMConnectivity *connectivity,
+ 	static const char *connectivity_states[] = { "UNKNOWN", "NONE", "PORTAL", "LIMITED", "FULL" };
+ 
+ 	state = nm_connectivity_get_state (connectivity);
+ 	nm_log_dbg (LOGD_CORE, "connectivity checking indicates %s",
+ 	            connectivity_states[state]);
+ 
+ 	nm_manager_update_state (self);
++	g_object_notify (G_OBJECT (self), NM_MANAGER_CONNECTIVITY);
+ }
+ 
+ static void
+ firmware_dir_changed (GFileMonitor *monitor,
+                       GFile *file,
+                       GFile *other_file,
+                       GFileMonitorEvent event_type,
+-- 
+1.9.3
+
diff --git a/NetworkManager.spec b/NetworkManager.spec
index 2501a17..9491cbf 100644
--- a/NetworkManager.spec
+++ b/NetworkManager.spec
@@ -121,6 +121,7 @@ Patch67: 0067-rh1113122-missing-dispatcher-event-on-dhcp-change.patch
 Patch68: 0068-cli-bash-completion-escaping.patch
 Patch69: 0069-rh1115538-fix-supplicant-crash-for-AddBlob.patch
 Patch70: 0070-rh1047083-handle-mtu-for-ip4-config-merge-and-subtract.patch
+Patch71: 0071-fix-connectivity-notification.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -356,6 +357,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
 %patch68 -p1 -b .0068-cli-bash-completion-escaping.orig
 %patch69 -p1 -b .0069-rh1115538-fix-supplicant-crash-for-AddBlob.orig
 %patch70 -p1 -b .0070-rh1047083-handle-mtu-for-ip4-config-merge-and-subtract.orig
+%patch71 -p1 -b .0071-fix-connectivity-notification.orig
 
 %build
 


More information about the scm-commits mailing list