checked for empty id in model()

This commit is contained in:
Max Baker
2004-01-28 06:41:19 +00:00
parent ddddb703aa
commit 5c6a8f3c45

View File

@@ -149,6 +149,12 @@ sub serial {
sub model {
my $l3 = shift;
my $id = $l3->id();
unless (defined $id){
print " SNMP::Info::Layer3::model() - Device does not support sysObjectID\n" if $DEBUG;
return undef;
}
my $model = &SNMP::translateObj($id);
$model =~ s/^cisco//i;