Code

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 bb9f3299cc9c9ca0513e452039ffa69fa63a3756..9130ecec4f89f9cb1bab82a0508be7b112665b23 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;