[gnome-shell/f15] backport 6709e5e45 (don't show hidden access points)

Ray Strode rstrode at fedoraproject.org
Wed Oct 12 15:43:55 UTC 2011


commit a48a58636844767b4ac1a203ef1f588a4ba2afa1
Author: Ray Strode <rstrode at redhat.com>
Date:   Wed Oct 12 11:43:02 2011 -0400

    backport 6709e5e45 (don't show hidden access points)
    
    This commit backports 6709e5e45 to prevent several minute delays.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=651378

 gnome-shell.spec      |   11 +++++-
 stop-long-hangs.patch |   88 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+), 1 deletions(-)
---
diff --git a/gnome-shell.spec b/gnome-shell.spec
index 54ce753..d24b882 100644
--- a/gnome-shell.spec
+++ b/gnome-shell.spec
@@ -1,6 +1,6 @@
 Name:           gnome-shell
 Version:        3.0.2
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Window management and application launching for GNOME
 
 Group:          User Interface/Desktops
@@ -11,6 +11,9 @@ Source0:        http://ftp.gnome.org/pub/GNOME/sources/gnome-shell/3.0/%{name}-%
 
 Patch0: gnome-shell-avoid-redhat-menus.patch
 
+# http://bugzilla.gnome.org/651378
+Patch1: stop-long-hangs.patch
+
 %define clutter_version 1.4.0
 %define gobject_introspection_version 0.10.1
 %define mutter_version 3.0.0
@@ -80,6 +83,7 @@ easy to use experience.
 %prep
 %setup -q
 %patch0 -p1 -b .avoid-redhat-menus
+%patch1 -p1 -b .stop-long-hangs
 
 %build
 (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi;
@@ -147,6 +151,11 @@ gconftool-2 --makefile-install-rule \
 glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas ||:
 
 %changelog
+* Wed Oct 12 2011 Ray Strode <rstrode at redhat.com> 3.0.2-6
+- Add upstream patch to prevent several minute
+  stalls when there are networks without ssids
+  Resolves: #705609
+
 * Fri Aug 19 2011 Dan Horák <dan[at]danny.cz> - 3.0.2-5
 - workaround a chrpath issue on s390(x)
 
diff --git a/stop-long-hangs.patch b/stop-long-hangs.patch
new file mode 100644
index 0000000..76e7839
--- /dev/null
+++ b/stop-long-hangs.patch
@@ -0,0 +1,88 @@
+From 026fbd024fcb5c91f8b7bd75343d1eb62cd63387 Mon Sep 17 00:00:00 2001
+From: Martin Dengler <martin at martindengler.com>
+Date: Wed, 12 Oct 2011 11:22:41 -0400
+Subject: [PATCH] network: backport 6709e5e45 (don't show hidden access
+ points)
+
+This commit backports 6709e5e45 to prevent several minute delays.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=651378
+---
+ js/ui/status/network.js |   33 +++++++++++++++++++++++++++++++++
+ 1 files changed, 33 insertions(+), 0 deletions(-)
+
+diff --git a/js/ui/status/network.js b/js/ui/status/network.js
+index 79e384a..74a395a 100644
+--- a/js/ui/status/network.js
++++ b/js/ui/status/network.js
+@@ -1013,6 +1013,16 @@ NMDeviceWireless.prototype = {
+         for (let i = 0; i < accessPoints.length; i++) {
+             // Access points are grouped by network
+             let ap = accessPoints[i];
++
++            if (ap.get_ssid() == null) {
++                // hidden access point cannot be added, we need to know
++                // the SSID and security details to connect
++                // nevertheless, the access point can acquire a SSID when
++                // NetworkManager connects to it (via nmcli or the control-center)
++                ap._notifySsidId = ap.connect('notify::ssid', Lang.bind(this, this._notifySsidCb));
++                continue;
++            }
++
+             let pos = this._findNetwork(ap);
+             let obj;
+             if (pos != -1) {
+@@ -1112,6 +1122,14 @@ NMDeviceWireless.prototype = {
+         }
+     },
+ 
++    _notifySsidCb: function(accessPoint) {
++        if (accessPoint.get_ssid() != null) {
++            accessPoint.disconnect(accessPoint._notifySsidId);
++            accessPoint._notifySsidId = 0;
++            this._accessPointAdded(this.device, accessPoint);
++        }
++    },
++
+     _getApSecurityType: function(accessPoint) {
+         if (accessPoint._secType)
+             return accessPoint._secType;
+@@ -1155,6 +1173,10 @@ NMDeviceWireless.prototype = {
+     },
+ 
+     _findNetwork: function(accessPoint) {
++        if (accessPoint == null)
++            return -1;
++        if (accessPoint.get_ssid() == null)
++            return -1;
+         for (let i = 0; i < this._networks.length; i++) {
+             if (this._networkCompare(this._networks[i], accessPoint))
+                 return i;
+@@ -1163,6 +1185,13 @@ NMDeviceWireless.prototype = {
+     },
+ 
+     _accessPointAdded: function(device, accessPoint) {
++        if (accessPoint.get_ssid() == null) {
++            // This access point is not visible yet
++            // Wait for it to get a ssid
++            accessPoint._notifySsidId = accessPoint.connect('notify::ssid', Lang.bind(this, this._notifySsidCb));
++            return;
++        }
++
+         let pos = this._findNetwork(accessPoint);
+         let apObj;
+         if (pos != -1) {
+@@ -1356,6 +1385,10 @@ NMDeviceWireless.prototype = {
+ 
+     _createActiveConnectionItem: function() {
+         let activeAp = this.device.active_access_point;
++        let networkPos = this._findNetwork(this.device.active_access_point);
++        if (networkPos == -1) // the connected access point is invisible
++            activeAp = null;
++
+         let icon, title;
+         if (this._activeConnection._connection) {
+             let connection = this._activeConnection._connection;
+-- 
+1.7.6.2
+


More information about the scm-commits mailing list