contrib/snmp-probe-host.px: Fix for `table' data without instance.
authorFlorian Forster <octo@noris.net>
Tue, 26 Aug 2008 15:57:38 +0000 (17:57 +0200)
committerFlorian Forster <octo@noris.net>
Tue, 26 Aug 2008 15:57:38 +0000 (17:57 +0200)
contrib/snmp-probe-host.px

index bb9f329..9130ece 100755 (executable)
@@ -61,10 +61,13 @@ sub probe_one
   }
 
   @oids = split (/"\s*"/, $conf->{'values'});
-  if (($conf->{'table'} =~ m/^(true|yes|on)$/i) && ($conf->{'instance'}))
+  if ($conf->{'table'} =~ m/^(true|yes|on)$/i)
   {
     $cmd = 'GETNEXT';
-    push (@oids, $conf->{'instance'});
+    if (defined ($conf->{'instance'}))
+    {
+      push (@oids, $conf->{'instance'});
+    }
   }
 
   require Data::Dumper;