summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-05-14 13:19:52 +0000
committerOlivier Blin <oblin@mandriva.com>2008-05-14 13:19:52 +0000
commit59b3c09f140c70004a6f76ee80b40faf1088a553 (patch)
tree0a3c6a87fbf836032b886b590755bb2fa65d9081
parent85af1c1cbabb8d8bc404643c4b733c69d9009447 (diff)
downloaddrakx-net-59b3c09f140c70004a6f76ee80b40faf1088a553.tar
drakx-net-59b3c09f140c70004a6f76ee80b40faf1088a553.tar.gz
drakx-net-59b3c09f140c70004a6f76ee80b40faf1088a553.tar.bz2
drakx-net-59b3c09f140c70004a6f76ee80b40faf1088a553.tar.xz
drakx-net-59b3c09f140c70004a6f76ee80b40faf1088a553.zip
rewrite for next commit
-rw-r--r--lib/network/monitor.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/network/monitor.pm b/lib/network/monitor.pm
index 40ebd12..6350cab 100644
--- a/lib/network/monitor.pm
+++ b/lib/network/monitor.pm
@@ -84,11 +84,15 @@ sub list_wireless {
/Mode:(\S*)/ and $net->{mode} = $1;
$net->{mode} = 'Managed' if $net->{mode} eq 'Master';
$_ =~ $quality_match and $net->{signal_strength} = $eval_quality->($1);
- m|Signal level[:=]([0-9]+/[0-9]+)| && !$net->{signal_strength} and $net->{signal_strength} = $eval_quality->($1);
+ m|Signal level[:=]([0-9]+/[0-9]+)| and $net->{signal_level} = $eval_quality->($1);
/key:(\S*)\s/ && $1 eq 'on' and $has_key = 1;
/Extra:wpa_ie=|IE:.*WPA/ and $has_wpa = 1;
/Authentication Suites \(\d+\) :.*\b802\.1x\b/ and $has_eap = 1;
}
+ foreach (values %networks) {
+ my $level = delete $_->{signal_level};
+ $_->{signal_strength} ||= $level;
+ }
if ($current_ap && exists $networks{$current_ap}) {
foreach (`/sbin/iwconfig $o_intf 2>/dev/null`) {
my $quality = $_ =~ $quality_match && $eval_quality->($1);