diff options
author | Dan Williams <dcbw@redhat.com> | 2007-04-06 19:50:57 (GMT) |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2007-04-06 19:50:57 (GMT) |
commit | 1d25366c4f37f2273b6cc09ca9bfabdbbcb3fd31 (patch) | |
tree | 1ac3d8da325f80278b0a6f11524b97098306c03a /shell/hardware/nmclient.py | |
parent | fc12f73fba418c91dcc795d169d4995bbf046693 (diff) |
Don't show Ad-Hoc mode networks in mesh view
Diffstat (limited to 'shell/hardware/nmclient.py')
-rw-r--r-- | shell/hardware/nmclient.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/hardware/nmclient.py b/shell/hardware/nmclient.py index 3bb682d..da1f18c 100644 --- a/shell/hardware/nmclient.py +++ b/shell/hardware/nmclient.py @@ -80,6 +80,9 @@ DEVICE_STATE_ACTIVATING = 0 DEVICE_STATE_ACTIVATED = 1 DEVICE_STATE_INACTIVE = 2 +IW_MODE_ADHOC = 1 +IW_MODE_INFRA = 2 + class Network(gobject.GObject): __gsignals__ = { 'initialized' : (gobject.SIGNAL_RUN_FIRST, @@ -118,6 +121,15 @@ class Network(gobject.GObject): self._valid = False self.emit('initialized', self._valid) return + if self._mode != IW_MODE_INFRA: + # Don't show Ad-Hoc networks; they usually don't DHCP and therefore + # won't work well here. This also works around the bug where we show + # our own mesh SSID on the Mesh view when in mesh mode + logging.debug("Net(%s): ssid '%s' is adhoc; not showing" % (self._op, + self._ssid)) + self._valid = False + self.emit('initialized', self._valid) + return self._valid = True logging.debug("Net(%s): ssid '%s', mode %d, strength %d" % (self._op, |