Handle SNMPv1 noSuchName response - iid = '' and val = ''.

Getting noSuchName in response to a getnext for an empty table
 resulted in a return value of { '' => '' } instead of undef.
Fixes [1596554]
This commit is contained in:
Bill Fenner
2006-11-23 06:51:38 +00:00
parent 84b1160c23
commit b1e0261216

View File

@@ -2735,6 +2735,11 @@ sub _load_attr {
if ($val eq 'ENDOFMIBVIEW'){
last;
}
# Similarly for SNMPv1 - noSuchName return results in both $iid
# and $val being empty strings.
if ($val eq '' and $iid eq ''){
last;
}
if ($val eq 'NOSUCHOBJECT'){
$self->error_throw("SNMP::Info::_load_attr: $attr : NOSUCHOBJECT");