summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-05-14 13:15:54 +0000
committerOlivier Blin <oblin@mandriva.com>2008-05-14 13:15:54 +0000
commit85af1c1cbabb8d8bc404643c4b733c69d9009447 (patch)
tree8fc1eaa4c045b50ee431012c1368f08c5bab2536 /lib/network
parent718b28b0be82ede59299adbd8ce8e7e231b851ac (diff)
downloaddrakx-net-85af1c1cbabb8d8bc404643c4b733c69d9009447.tar
drakx-net-85af1c1cbabb8d8bc404643c4b733c69d9009447.tar.gz
drakx-net-85af1c1cbabb8d8bc404643c4b733c69d9009447.tar.bz2
drakx-net-85af1c1cbabb8d8bc404643c4b733c69d9009447.tar.xz
drakx-net-85af1c1cbabb8d8bc404643c4b733c69d9009447.zip
use eval_quality helper as well not to divide by zero
Diffstat (limited to 'lib/network')
-rw-r--r--lib/network/monitor.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/network/monitor.pm b/lib/network/monitor.pm
index db34818..40ebd12 100644
--- a/lib/network/monitor.pm
+++ b/lib/network/monitor.pm
@@ -84,7 +84,7 @@ 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($1)*100;
+ m|Signal level[:=]([0-9]+/[0-9]+)| && !$net->{signal_strength} and $net->{signal_strength} = $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;