handle snmp discovery without desc
This commit is contained in:
parent
bdfff89f5f
commit
44da540da2
|
@ -99,6 +99,7 @@ my $lookup_type = [
|
||||||
sub define_type {
|
sub define_type {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
return "unknown" unless (defined($options{desc}) && $options{desc} ne '');
|
||||||
foreach (@$lookup_type) {
|
foreach (@$lookup_type) {
|
||||||
if ($options{desc} =~ /$_->{re}/) {
|
if ($options{desc} =~ /$_->{re}/) {
|
||||||
return $_->{type};
|
return $_->{type};
|
||||||
|
|
Loading…
Reference in New Issue