mirror of
https://github.com/gryf/wicd.git
synced 2025-12-22 05:48:03 +01:00
Fix some issues with wired networks caused by refactoring.
Add missing return statement.
This commit is contained in:
@@ -297,10 +297,11 @@ class appGui(object):
|
||||
'org.wicd.daemon')
|
||||
bus.add_signal_receiver(self.handle_connection_results,
|
||||
'ConnectResultsSent', 'org.wicd.daemon')
|
||||
bus.add_signal_receiver(handle_no_dbus, "DaemonClosing",
|
||||
"org.wicd.daemon")
|
||||
bus.add_signal_receiver(lambda: setup_dbus(force=False),
|
||||
"DaemonStarting", "org.wicd.daemon")
|
||||
if standalone:
|
||||
bus.add_signal_receiver(handle_no_dbus, "DaemonClosing",
|
||||
"org.wicd.daemon")
|
||||
try:
|
||||
gobject.timeout_add_seconds(1, self.update_statusbar)
|
||||
except:
|
||||
|
||||
@@ -391,9 +391,8 @@ class ConnectThread(threading.Thread):
|
||||
|
||||
@abortable
|
||||
def stop_dhcp_clients(self, iface):
|
||||
""" Stop and running DHCP clients, as well as wpa_supplicant. """
|
||||
print 'Stopping wpa_supplicant and any DHCP clients'
|
||||
iface.StopWPA()
|
||||
""" Stop and running DHCP clients. """
|
||||
print 'Stopping DHCP clients'
|
||||
BACKEND.StopDHCP()
|
||||
|
||||
def connect_aborted(self, reason):
|
||||
@@ -710,6 +709,7 @@ class WirelessConnectThread(ConnectThread):
|
||||
self.release_dhcp_clients(wiface)
|
||||
self.reset_ip_addresses(wiface)
|
||||
self.stop_dhcp_clients(wiface)
|
||||
self.stop_wpa(wiface)
|
||||
self.flush_routes(wiface)
|
||||
|
||||
# Generate PSK and authenticate if needed.
|
||||
@@ -752,6 +752,12 @@ class WirelessConnectThread(ConnectThread):
|
||||
self.connect_result = "Success"
|
||||
self.is_connecting = False
|
||||
|
||||
@abortable
|
||||
def stop_wpa(self, wiface):
|
||||
""" Stops wpa_supplicant. """
|
||||
print 'Stopping wpa_supplicant'
|
||||
wiface.StopWPA()
|
||||
|
||||
@abortable
|
||||
def generate_psk_and_authenticate(self, wiface):
|
||||
""" Generates a PSK and authenticates if necessary.
|
||||
@@ -860,7 +866,7 @@ class WiredConnectThread(ConnectThread):
|
||||
to the specified network.
|
||||
|
||||
"""
|
||||
def __init__(self, network, wireless, before_script, after_script,
|
||||
def __init__(self, network, wired, before_script, after_script,
|
||||
disconnect_script, gdns1, gdns2, gdns3, gsearch_dom, liface,
|
||||
debug=False):
|
||||
""" Initialise the thread with network information.
|
||||
|
||||
@@ -312,7 +312,7 @@ class WicdDaemon(dbus.service.Object):
|
||||
@dbus.service.method('org.wicd.daemon')
|
||||
def GetAutoReconnect(self):
|
||||
""" Returns the value of self.auto_reconnect. See SetAutoReconnect. """
|
||||
do = bool(self.auto_reconnect)
|
||||
return bool(self.auto_reconnect)
|
||||
|
||||
@dbus.service.method('org.wicd.daemon')
|
||||
def SetAutoReconnect(self, value):
|
||||
|
||||
Reference in New Issue
Block a user