~ubuntu-branches/ubuntu/wily/wicd/wily

« back to all changes in this revision

Viewing changes to debian/patches/09-fix_wire_plugging_detection.patch

  • Committer: Bazaar Package Importer
  • Author(s): David Paleino
  • Date: 2009-06-22 17:59:27 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090622175927-iax3alden0bmj6zg
Tags: 1.6.1-3
* debian/config, debian/templates updated:
  - only show users to add to netdev, skip those who are already
    members (Closes: #534138)
  - gracefully handle upgrades from previous broken versions, where
    debconf set a value of ${default} for wicd/users
    (Closes: #532112)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Fix detection of wire plugging/unplugging.
2
2
Patch provided by Giuseppe Martino <denever@truelite.it>, thank you!
3
3
---
4
 
 wicd/monitor.py     |   11 +++++++++++
 
4
 wicd/monitor.py     |   10 ++++++++++
5
5
 wicd/wicd-daemon.py |   12 ++++++++++++
6
 
 2 files changed, 23 insertions(+)
 
6
 2 files changed, 22 insertions(+)
7
7
 
8
8
--- wicd-1.5.9.orig/wicd/monitor.py
9
9
+++ wicd-1.5.9/wicd/monitor.py
15
15
 
16
16
     def check_for_wired_connection(self, wired_ip):
17
17
         """ Checks for an active wired connection.
18
 
@@ -160,6 +161,16 @@ class ConnectionStatus(object):
 
18
@@ -160,6 +161,15 @@ class ConnectionStatus(object):
19
19
                 
20
20
                 # Check for wired.
21
21
                 wired_ip = wired.GetWiredIP()
22
22
+
23
 
+                if wired_ip is None:
24
 
+                    if not self.plugged and wired.CheckPluggedIn():
25
 
+                        daemon.SendWirePluggedSignal()
26
 
+                        self.plugged = True
 
23
+                if not self.plugged and wired.CheckPluggedIn():
 
24
+                    daemon.SendWirePluggedSignal()
 
25
+                    self.plugged = True
27
26
+
28
27
+                if self.plugged and not wired.CheckPluggedIn():
29
28
+                    daemon.SendWireUnpluggedSignal()