diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-07-22 03:09:50 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-07-22 03:09:50 +0000 |
commit | 5ec52c56b184d4f1c9013b79d19ac012c86cd0ba (patch) | |
tree | 382b910cd5b94fe50a0818d0425c6f424a9884f3 | |
parent | 3adde30fee811cc5caa365fadb738962ca6f1dc9 (diff) | |
download | drakx-backup-do-not-use-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.tar drakx-backup-do-not-use-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.tar.gz drakx-backup-do-not-use-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.tar.bz2 drakx-backup-do-not-use-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.tar.xz drakx-backup-do-not-use-5ec52c56b184d4f1c9013b79d19ac012c86cd0ba.zip |
add some comments, use meaningfull variable names
-rw-r--r-- | perl-install/network/monitor.pm | 13 |
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; |