diff --git a/wicd/gui.py b/wicd/gui.py index 2957166..83d709a 100644 --- a/wicd/gui.py +++ b/wicd/gui.py @@ -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: diff --git a/wicd/networking.py b/wicd/networking.py index 180da9d..47b7e53 100644 --- a/wicd/networking.py +++ b/wicd/networking.py @@ -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. diff --git a/wicd/wicd-daemon.py b/wicd/wicd-daemon.py index 2c75d9c..5129653 100644 --- a/wicd/wicd-daemon.py +++ b/wicd/wicd-daemon.py @@ -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):