Don't show Ad-Hoc mode networks in mesh view
This commit is contained in:
parent
fc12f73fba
commit
1d25366c4f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user