[Pkg-nagios-devel] Bug#647020: nagios-plugins-standard: fix for check_snmp to accept comma-separated list of labels
Oskar Liljeblad
oskar at osk.mine.nu
Sat Oct 29 13:57:34 UTC 2011
Package: nagios-plugins-standard
Version: 1.4.15-3squeeze1
Severity: normal
There is a bug in check_snmp which prevents it from accepting multiple labels with -l
(e.g. -l label1,label2). This patch fixes that.
Regards,
Oskar Liljeblad
diff -u -p -b nagios-plugins-1.4.15/plugins/check_snmp.c.v0 nagios-plugins-1.4.15/plugins/check_snmp.c
--- nagios-plugins-1.4.15/plugins/check_snmp.c.v0 2010-07-27 22:47:16.000000000 +0200
+++ nagios-plugins-1.4.15/plugins/check_snmp.c 2011-10-29 15:51:51.000000000 +0200
@@ -753,7 +753,7 @@ process_arguments (int argc, char **argv
if (labels == NULL)
die (STATE_UNKNOWN, _("Could not reallocate labels\n"));
}
- labels++;
+ nlabels++;
ptr = thisarg (ptr);
if (strstr (ptr, "'") == ptr)
labels[nlabels - 1] = ptr + 1;
More information about the Pkg-nagios-devel
mailing list