diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-02-27 11:19:51 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-02-27 11:19:51 +0000 |
commit | 5b13e752e1aef771be2345ce9cb98a34dc94eda3 (patch) | |
tree | c131de3d7c96cf955704d427a008ac9619d3de44 /lib | |
parent | cf63d38add2a27f2b6cc3fd1c7d40f3e2061df4f (diff) | |
download | drakx-net-5b13e752e1aef771be2345ce9cb98a34dc94eda3.tar drakx-net-5b13e752e1aef771be2345ce9cb98a34dc94eda3.tar.gz drakx-net-5b13e752e1aef771be2345ce9cb98a34dc94eda3.tar.bz2 drakx-net-5b13e752e1aef771be2345ce9cb98a34dc94eda3.tar.xz drakx-net-5b13e752e1aef771be2345ce9cb98a34dc94eda3.zip |
do not crash with prism54 driver which reports quality with division by zero
(assume max signal quality is 255 instead, from Eddy De Greef, #34845 and #37879)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/monitor.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/network/monitor.pm b/lib/network/monitor.pm index 5ae0f4a..151d6cb 100644 --- a/lib/network/monitor.pm +++ b/lib/network/monitor.pm @@ -64,6 +64,7 @@ sub list_wireless { my $quality_match = qr/Quality[:=](\S*)/; my $eval_quality = sub { my ($qual) = @_; + $qual =~ s!/0+$!/255!; #- prism54 reports quality with division by zero $qual =~ m!/! ? eval($qual)*100 : $qual; }; foreach (@list) { |