Avoid deep recusion when AUTOLOAD and carp collide

This commit is contained in:
Oliver Gorwits
2016-02-25 20:02:19 +00:00
parent 998356484b
commit 07605051f5
2 changed files with 9 additions and 2 deletions

View File

@@ -4,8 +4,9 @@ version 3.32 ()
[BUG FIXES]
* Support undefined (noSuchIntance) values in Offline mode
* Do not init table cache if Cache provided by user
* Support undefined (noSuchInstance) values in Offline mode
* Do not init table cache if Cache provided by usera
* Avoid deep recusion when AUTOLOAD and carp collide
version 3.31 (2016-01-22)

View File

@@ -3794,6 +3794,7 @@ These methods return data as a scalar.
sub _global {
my $method = shift;
my $oid = shift;
return sub {} if $method eq 'CARP_TRACE';
return sub {
my $self = shift;
@@ -4521,6 +4522,11 @@ sub _validate_autoload_method {
$leaf_name =~ s/_/-/g;
}
# skip if offline
if ( $self->{Offline} ) {
return [1,(exists $self->{store}->{$method} ? 1: 0)];
}
# Translate MIB leaf node name to OID
my $oid = SNMP::translateObj($leaf_name);