add genError in snmp-autoreduce

This commit is contained in:
garnier-quentin 2019-05-23 15:10:34 +02:00
parent a95b50bbcc
commit e6aedd1c6c
1 changed files with 6 additions and 3 deletions

View File

@ -313,7 +313,8 @@ sub get_leef {
next; next;
} }
if ($self->{snmp_autoreduce} == 1 && ($self->{session}->{ErrorNum} == 1 || $self->{session}->{ErrorNum} == -24)) { if ($self->{snmp_autoreduce} == 1 &&
($self->{session}->{ErrorNum} == 1 || $self->{session}->{ErrorNum} == 5 || $self->{session}->{ErrorNum} == -24)) {
next if ($self->autoreduce_leef(current => $entry) == 0); next if ($self->autoreduce_leef(current => $entry) == 0);
} }
my $msg = 'SNMP GET Request : ' . $self->{session}->{ErrorStr}; my $msg = 'SNMP GET Request : ' . $self->{session}->{ErrorStr};
@ -462,7 +463,8 @@ sub get_multiple_table {
next; next;
} }
if ($self->{snmp_autoreduce} == 1 && ($self->{session}->{ErrorNum} == 1 || $self->{session}->{ErrorNum} == -24)) { if ($self->{snmp_autoreduce} == 1 &&
($self->{session}->{ErrorNum} == 1 || $self->{session}->{ErrorNum} == 5 || $self->{session}->{ErrorNum} == -24)) {
next if ($self->autoreduce_multiple_table(repeat_count => \$repeat_count) == 0); next if ($self->autoreduce_multiple_table(repeat_count => \$repeat_count) == 0);
} }
@ -607,7 +609,8 @@ sub get_table {
# We are at the end with snmpv1. We quit. # We are at the end with snmpv1. We quit.
last; last;
} }
if ($self->{snmp_autoreduce} == 1 && ($self->{session}->{ErrorNum} == 1 || $self->{session}->{ErrorNum} == -24)) { if ($self->{snmp_autoreduce} == 1 &&
($self->{session}->{ErrorNum} == 1 || $self->{session}->{ErrorNum} == 5 || $self->{session}->{ErrorNum} == -24)) {
next if ($self->autoreduce_table(repeat_count => \$repeat_count) == 0); next if ($self->autoreduce_table(repeat_count => \$repeat_count) == 0);
} }