summaryrefslogtreecommitdiffstats
path: root/perl-install/network/monitor.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network/monitor.pm')
-rw-r--r--perl-install/network/monitor.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/network/monitor.pm b/perl-install/network/monitor.pm
index 3338a452d..27145ef9f 100644
--- a/perl-install/network/monitor.pm
+++ b/perl-install/network/monitor.pm
@@ -16,14 +16,17 @@ sub new {
sub list_wireless {
my ($o) = @_;
- my $networks;
- eval { $networks = $o->call_method('ScanResults') };
+ my $results;
+ eval { $results = $o->call_method('ScanResults') };
my %networks;
- while ($networks =~ /^((?:[0-9a-f]{2}:){5}[0-9a-f]{2})\t(\d+)\t(\d+)\t(.*?)\t(.*)$/mg) {
+ #- bssid / frequency / signal level / flags / ssid
+ while ($results =~ /^((?:[0-9a-f]{2}:){5}[0-9a-f]{2})\t(\d+)\t(\d+)\t(.*?)\t(.*)$/mg) {
$networks{$1} = { frequency => $2, signal_level => $3, flags => $4, ssid => $5 };
}
- eval { $networks = $o->call_method('ListNetworks') };
- while ($networks =~ /^(\d+)\t(.*?)\t(.*?)\t(.*)$/mg) {
+ my $list;
+ eval { $list = $o->call_method('ListNetworks') };
+ #- network id / ssid / bssid / flags
+ while ($list =~ /^(\d+)\t(.*?)\t(.*?)\t(.*)$/mg) {
if (my $net = $networks{$3} || find { $_->{ssid} eq $2 } values(%networks)) {
$net->{id} = $1;
$net->{ssid} ||= $2;