Your message dated Fri, 3 Apr 2009 16:00:27 +0200
with message-id <20090403160027.05dac...@pingu>
and subject line Re: Bug#522204: wicd: EndScan signal could transport the 
result of the scan
has caused the Debian Bug report #522204,
regarding wicd: EndScan signal could transport the result of the scan
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
522204: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522204
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: wicd
Version: 1.5.9-5
Severity: wishlist
Tags: patch


Maybe it would be useful that EndScanSignal transports the result of the 
wireless scan.
A patch is attached.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.28.9 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages wicd depends on:
ii  adduser                     3.110        add and remove users and groups
ii  dhcp3-client                3.1.1-6      DHCP client
ii  ethtool                     6+20090307-1 display or change Ethernet device 
ii  iproute                     20090115-1   networking and traffic control too
ii  net-tools                   1.60-23      The NET-3 networking toolkit
ii  python                      2.5.4-2      An interactive high-level object-o
ii  python-dbus                 0.83.0-1     simple interprocess messaging syst
ii  python-glade2               2.14.1-1     GTK+ bindings: Glade support
ii  python-gtk2                 2.14.1-1     Python bindings for the GTK+ widge
ii  python-support              0.8.7        automated rebuilding support for P
ii  wireless-tools              29-1.1       Tools for manipulating Linux Wirel
ii  wpasupplicant               0.6.9-1      client support for WPA and WPA2 (I

wicd recommends no packages.

Versions of packages wicd suggests:
ii  pm-utils                      1.2.4-2    utilities and scripts for power ma

-- no debconf information
Index: wicd/networking.py
===================================================================
--- wicd.orig/networking.py	2009-04-01 18:02:27.000000000 +0200
+++ wicd/networking.py	2009-04-01 18:02:52.000000000 +0200
@@ -423,10 +423,11 @@
             print 'Setting hidden essid' + essid
             wiface.SetEssid(essid)
 
-        aps = wiface.GetNetworks()
+        aps, stripped_aps = wiface.GetNetworks()
         aps.sort(cmp=comp, reverse=True)
+        stripped_aps.sort(cmp=comp, reverse=True)
         
-        return aps
+        return aps, stripped_aps
 
     def Connect(self, network, debug=False):
         """ Spawn a connection thread to connect to the network.
Index: wicd/wnettools.py
===================================================================
--- wicd.orig/wnettools.py	2009-04-01 17:57:23.000000000 +0200
+++ wicd/wnettools.py	2009-04-01 18:31:14.000000000 +0200
@@ -748,15 +748,20 @@
 
         # An array for the access points
         access_points = []
+        stripped_access_points = []
         for cell in networks:
             # Only use sections where there is an ESSID.
             if 'ESSID:' in cell:
                 # Add this network to the list of networks
-                entry = self._ParseAccessPoint(cell, ralink_info)
+                entry, stripped_entry = self._ParseAccessPoint(cell, ralink_info)
                 if entry is not None:
                     access_points.append(entry)
 
-        return access_points
+                if entry_stripped is not None:
+                    access_points_stripped.append(entry_stripped)
+
+
+        return access_points, access_points_stripped
 
     def _FreqToChannel(self, freq):
         """ Translate the specified frequency to a channel.
@@ -851,6 +856,7 @@
 
         """
         ap = {}
+        stripped_ap = {}
         # ESSID - Switch '<hidden>' to 'Hidden' to remove
         # brackets that can mix up formatting.
         ap['essid'] = misc.RunRegex(essid_pattern, cell)
@@ -865,6 +871,7 @@
         else:
             ap['hidden'] = False
 
+        stripped_ap['essid'] =  ap['essid']
         # Channel - For cards that don't have a channel number,
         # convert the frequency.
         ap['channel'] = misc.RunRegex(channel_pattern, cell)
@@ -894,8 +901,11 @@
 
             if misc.RunRegex(wpa2_pattern, cell) == 'WPA2':
                 ap['encryption_method'] = 'WPA2'
+
+            stripped_ap['encryption_method'] = ap['encryption_method']
         else:
             ap['encryption'] = False
+            stripped_ap['encryption_method'] = 'Open'
 
         # Link Quality
         # Set strength to -1 if the quality is not found
@@ -917,6 +927,8 @@
         else:
             ap['quality'] = -1
 
+        stripped_ap['quality'] = ap['quality']
+
         # Signal Strength (only used if user doesn't want link
         # quality displayed or it isn't found)
         if misc.RunRegex(signaldbm_pattern, cell):
@@ -924,7 +936,7 @@
         elif self.wpa_driver != RALINK_DRIVER:  # This is already set for ralink
             ap['strength'] = -1
 
-        return ap
+        return ap, stripped_ap
 
     def _ParseRalinkAccessPoint(self, ap, ralink_info, cell):
         """ Parse encryption and signal strength info for ralink cards
Index: wicd/wicd-daemon.py
===================================================================
--- wicd.orig/wicd-daemon.py	2009-04-01 18:03:05.000000000 +0200
+++ wicd/wicd-daemon.py	2009-04-01 18:18:53.000000000 +0200
@@ -676,6 +676,16 @@
         """ Emits a signal announcing a scan has finished. """
         pass
 
+    @dbus.service.method('org.wicd.daemon')
+    def EmitEndScanSignalWithResult(self, scan):
+        print scan
+        self.EndScanSignalWithResult(scan)
+    
+    @dbus.service.signal(dbus_interface='org.wicd.daemon', signature='aa{sv}')
+    def EndScanSignalWithResult(self, scan):
+        """ Emits a signal announcing a scan has finished. """
+        pass
+
     ########## WIRELESS FUNCTIONS
     #################################
 
@@ -696,14 +706,14 @@
             print 'scanning start'
         self.SendStartScanSignal()
         time.sleep(.2)
-        scan = self.wifi.Scan(str(self.hidden_essid))
+        scan, scan_stripped = self.wifi.Scan(str(self.hidden_essid))
         self.LastScan = scan
         if self.debug_mode:
             print 'scanning done'
             print 'found ' + str(len(scan)) + ' networks:'
         for i, network in enumerate(scan):
             self.ReadWirelessNetworkProfile(i)
-        self.SendEndScanSignal()
+        self.EmitEndScanSignalWithResult(scan_stripped)
 
     @dbus.service.method('org.wicd.daemon.wireless')
     def GetIwconfig(self):

--- End Message ---
--- Begin Message ---
tags 522204 wontfix
thanks

On Thu, 2 Apr 2009 14:53:27 +0200, Giuseppe `denever` Martino wrote:

> A fixed patch in attachment.

As you asked on IRC, I won't include this patch. Here I include the points you
raised, for archival purposes:

- with org.wicd.wireless.GetWirelessProperty(id,'essid|quality|etc') you can
  get whatever information you need;
- it replaces the SendScanEnd signal, which the GUI is waiting for.

Salutamu! ;),
David

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to