From 608c45addd53e5c241c7236e797d2844b1ed6f64 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Wed, 7 Dec 2016 13:14:32 +0100 Subject: [PATCH] + Fix ilo condition --- hardware/server/hp/proliant/snmp/mode/components/ilo.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/server/hp/proliant/snmp/mode/components/ilo.pm b/hardware/server/hp/proliant/snmp/mode/components/ilo.pm index 6e50b48b7..e0affc70f 100644 --- a/hardware/server/hp/proliant/snmp/mode/components/ilo.pm +++ b/hardware/server/hp/proliant/snmp/mode/components/ilo.pm @@ -68,7 +68,7 @@ sub check { $self->{components}->{ilo} = {name => 'ilo', total => 0, skip => 0}; return if ($self->check_filter(section => 'ilo')); - return if (!defined($self->{results}->{$mapping->{cpqSm2MibCondition}->{oid}})); + return if (scalar(keys %{$self->{results}->{$mapping->{cpqSm2MibCondition}->{oid}}}) == 0); my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$mapping->{cpqSm2MibCondition}->{oid}}, instance => '0'); next if ($self->check_filter(section => 'ilo', instance => '0'));