last if $snmp->{'ErrorStr'};
last unless $SNMP::MIB{$varbind->[0]}; # does this happen?
my $nextoid = $SNMP::MIB{$varbind->[0]}->{'objectID'};
last unless $nextoid =~ /^$oid/;
$max--;
last if $snmp->{'ErrorStr'};
last unless $SNMP::MIB{$varbind->[0]}; # does this happen?
my $nextoid = $SNMP::MIB{$varbind->[0]}->{'objectID'};
last unless $nextoid =~ /^$oid/;
$max--;
}
} else {
# not clear on what max-repeaters (25) does, plucked value from example code
# but based on testing, it isn't capping number of returned values
}
} else {
# not clear on what max-repeaters (25) does, plucked value from example code
# but based on testing, it isn't capping number of returned values
- @values = $snmp->bulkwalk(0,25,$oid);
+ my ($values) = $snmp->bulkwalk(0,25,$oid);
+ @values = @$values if $values;
}
if ($snmp->{'ErrorStr'} || !@values) {
push @out, { 'error' => $snmp->{'ErrorStr'} || 'No values retrieved' };
}
if ($snmp->{'ErrorStr'} || !@values) {
push @out, { 'error' => $snmp->{'ErrorStr'} || 'No values retrieved' };