From 5d32de737594bc5129e55a11640cdf3a27456f26 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Mon, 30 May 2016 13:15:09 +0200 Subject: [PATCH] + revert commit --- hardware/ups/standard/rfc1628/snmp/mode/inputlines.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/ups/standard/rfc1628/snmp/mode/inputlines.pm b/hardware/ups/standard/rfc1628/snmp/mode/inputlines.pm index 1c55054e8..579e594c7 100644 --- a/hardware/ups/standard/rfc1628/snmp/mode/inputlines.pm +++ b/hardware/ups/standard/rfc1628/snmp/mode/inputlines.pm @@ -109,7 +109,7 @@ sub manage_selection { next if ($oid !~ /^(.*)\.(.*?)\.(.*?)$/); my ($base, $instance) = ($1 . '.' . $2, $3); next if (!defined($oids->{$base})); - next if ($results->{$oid} !~ /\d/); + next if ($results->{$oid} !~ /\d/ || $results->{$oid} == 0); $self->{line}->{$instance} = { display => $instance } if (!defined($self->{line}->{$instance})); $self->{line}->{$instance}->{$oids->{$base}->{name}} = $results->{$oid} * $oids->{$base}->{factor};