summaryrefslogtreecommitdiffstats
path: root/perl-install/network/monitor.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-22 03:09:50 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-22 03:09:50 +0000
commit5ec52c56b184d4f1c9013b79d19ac012c86cd0ba (patch)
tree382b910cd5b94fe50a0818d0425c6f424a9884f3 /perl-install/network/monitor.pm
parent3adde30fee811cc5caa365fadb738962ca6f1dc9 (diff)
downloaddrakx-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.tar
drakx-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.tar.gz
drakx-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.tar.bz2
drakx-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.tar.xz
drakx-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.zip
add some comments, use meaningfull variable names
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;