Package: wicd
Version: 1.7.2.4-4.1
Severity: normal
Apparently the wired connection process is too fast in setting the ip
address and issuing an update_connection_status() .
When using a static ip the function CheckPluggedIn() in wicd_daemon.py
initially returns a 0 even if the cable is connected and the ip properly
set: I believe that is due to some kind of delay having put the
interface down and then up before connecting and the extra time dhcp
takes to get/set an address could explain why the issue is not present
when not using static IPs.
As a patch/workaround I added a time.sleep(1) at the beginning of
check_for_wired_connection() and now everything works like a charm if
you don't mind the extra second delay, of course.
Here is the update_connection_status() in monitor.py:
def check_for_wired_connection(self, wired_ip):
""" Checks for a wired connection.
Checks for two states:
1) A wired connection is not in use, but a cable is plugged
in, and the user has chosen to switch to a wired connection
whenever its available, even if already connected to a
wireless network.
2) A wired connection is currently active.
"""
time.sleep(1)
self.trigger_reconnect = False
if not wired_ip and daemon.GetPreferWiredNetwork():
if not daemon.GetForcedDisconnect() and wired.CheckPluggedIn():
self.trigger_reconnect = True
elif wired_ip and wired.CheckPluggedIn():
# Only change the interface if it's not already set for wired
if not self.still_wired:
daemon.SetCurrentInterface(daemon.GetWiredInterface())
self.still_wired = True
return True
# Wired connection isn't active
elif wired_ip and self.still_wired:
# If we still have an IP, but no cable is plugged in
# we should disconnect to clear it.
wired.DisconnectWired()
self.still_wired = False
return False
The issue is here:
elif wired_ip and wired.CheckPluggedIn() --> it is not verified because
of wired.CheckPluggedIn() returning 0 before settling to 1.
Mattia Belluco
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org