File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
lib/GLPI/Agent/SNMP/MibSupport Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ sub getComponents {
4242 # Replace components with found HA devices
4343 my $index = $self -> walk(fgHaStatsIndex);
4444 if (ref ($index ) eq " HASH" ) {
45- delete $device -> {COMPONENTS };
4645 my @index = sort values (%{$index });
4746 foreach my $index (@index ) {
48- my $serial = getCanonicalString($self -> get(fgHaStatsSerial." ." .$index ));
47+ my $serial = getCanonicalString($self -> get(fgHaStatsSerial." ." .$index ))
48+ or next ;
4949 push @components , {
5050 INDEX => $index ,
5151 NAME => getCanonicalString($self -> get(fgHaStatsHostname." ." .$index )),
@@ -55,6 +55,8 @@ sub getComponents {
5555 TYPE => ' chassis' ,
5656 };
5757 }
58+ return unless @components ;
59+ delete $device -> {COMPONENTS };
5860 }
5961 }
6062
You can’t perform that action at this time.
0 commit comments