1
0
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:
Dan O'Reilly
2008-12-22 00:20:42 -05:00
parent 16aad93feb
commit 2c24f4b0db
3 changed files with 14 additions and 7 deletions

View File

@@ -297,10 +297,11 @@ class appGui(object):
'org.wicd.daemon') 'org.wicd.daemon')
bus.add_signal_receiver(self.handle_connection_results, bus.add_signal_receiver(self.handle_connection_results,
'ConnectResultsSent', 'org.wicd.daemon') 'ConnectResultsSent', 'org.wicd.daemon')
bus.add_signal_receiver(handle_no_dbus, "DaemonClosing",
"org.wicd.daemon")
bus.add_signal_receiver(lambda: setup_dbus(force=False), bus.add_signal_receiver(lambda: setup_dbus(force=False),
"DaemonStarting", "org.wicd.daemon") "DaemonStarting", "org.wicd.daemon")
if standalone:
bus.add_signal_receiver(handle_no_dbus, "DaemonClosing",
"org.wicd.daemon")
try: try:
gobject.timeout_add_seconds(1, self.update_statusbar) gobject.timeout_add_seconds(1, self.update_statusbar)
except: except:

View File

@@ -391,9 +391,8 @@ class ConnectThread(threading.Thread):
@abortable @abortable
def stop_dhcp_clients(self, iface): def stop_dhcp_clients(self, iface):
""" Stop and running DHCP clients, as well as wpa_supplicant. """ """ Stop and running DHCP clients. """
print 'Stopping wpa_supplicant and any DHCP clients' print 'Stopping DHCP clients'
iface.StopWPA()
BACKEND.StopDHCP() BACKEND.StopDHCP()
def connect_aborted(self, reason): def connect_aborted(self, reason):
@@ -710,6 +709,7 @@ class WirelessConnectThread(ConnectThread):
self.release_dhcp_clients(wiface) self.release_dhcp_clients(wiface)
self.reset_ip_addresses(wiface) self.reset_ip_addresses(wiface)
self.stop_dhcp_clients(wiface) self.stop_dhcp_clients(wiface)
self.stop_wpa(wiface)
self.flush_routes(wiface) self.flush_routes(wiface)
# Generate PSK and authenticate if needed. # Generate PSK and authenticate if needed.
@@ -752,6 +752,12 @@ class WirelessConnectThread(ConnectThread):
self.connect_result = "Success" self.connect_result = "Success"
self.is_connecting = False self.is_connecting = False
@abortable
def stop_wpa(self, wiface):
""" Stops wpa_supplicant. """
print 'Stopping wpa_supplicant'
wiface.StopWPA()
@abortable @abortable
def generate_psk_and_authenticate(self, wiface): def generate_psk_and_authenticate(self, wiface):
""" Generates a PSK and authenticates if necessary. """ Generates a PSK and authenticates if necessary.
@@ -860,7 +866,7 @@ class WiredConnectThread(ConnectThread):
to the specified network. 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, disconnect_script, gdns1, gdns2, gdns3, gsearch_dom, liface,
debug=False): debug=False):
""" Initialise the thread with network information. """ Initialise the thread with network information.

View File

@@ -312,7 +312,7 @@ class WicdDaemon(dbus.service.Object):
@dbus.service.method('org.wicd.daemon') @dbus.service.method('org.wicd.daemon')
def GetAutoReconnect(self): def GetAutoReconnect(self):
""" Returns the value of self.auto_reconnect. See SetAutoReconnect. """ """ 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') @dbus.service.method('org.wicd.daemon')
def SetAutoReconnect(self, value): def SetAutoReconnect(self, value):