From c7bc921709ee19e2e3b9482565d1b9a285fa18fe Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 29 Feb 2008 00:37:03 +0000 Subject: 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, backport from trunk) --- lib/network/monitor.pm | 1 + 1 file changed, 1 insertion(+) 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) { -- cgit v1.2.1