Bläddra i källkod

In check_snmp.c, --offset does not appear to do anything

Fix for issue https://github.com/nagios-plugins/nagios-plugins/issues/153
John C. Frickson 9 år sedan
förälder
incheckning
eca31663f1
2 ändrade filer med 2 tillägg och 1 borttagningar
  1. 1 0
      NEWS
  2. 1 1
      plugins/check_snmp.c

+ 1 - 0
NEWS

@@ -15,6 +15,7 @@ This file documents the major additions and syntax changes between releases.
 	check_swap.c: does not accept threshold of zero
 	check_swap.c: uses inconsistent checks on negative thresholds
 	check_disk_smb.pl: add support for -k for kerberos authentication
+	check_snmp.c: --offset does not appear to do anything (Troy Lea)
 
 
 2.1.2 2016-08-01

+ 1 - 1
plugins/check_snmp.c

@@ -485,7 +485,7 @@ main (int argc, char **argv)
 
 		/* Process this block for numeric comparisons */
 		/* Make some special values,like Timeticks numeric only if a threshold is defined */
-		if (thlds[i]->warning || thlds[i]->critical || calculate_rate || is_ticks) {
+		if (thlds[i]->warning || thlds[i]->critical || calculate_rate || is_ticks || offset != 0.0) {
 			ptr = strpbrk (show, "-0123456789");
 			if (ptr == NULL)
 				die (STATE_UNKNOWN,_("No valid data returned (%s)\n"), show);