From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/311556-patch-nagios-plugins-1.4.12 | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 web/attachments/311556-patch-nagios-plugins-1.4.12 (limited to 'web/attachments/311556-patch-nagios-plugins-1.4.12') diff --git a/web/attachments/311556-patch-nagios-plugins-1.4.12 b/web/attachments/311556-patch-nagios-plugins-1.4.12 new file mode 100644 index 0000000..49a3d6f --- /dev/null +++ b/web/attachments/311556-patch-nagios-plugins-1.4.12 @@ -0,0 +1,56 @@ +--- check_smtp.orig 2009-01-19 10:57:05.000000000 +0100 ++++ check_smtp.c 2009-01-19 11:34:04.000000000 +0100 +@@ -103,9 +103,9 @@ + char *authtype = NULL; + char *authuser = NULL; + char *authpass = NULL; +-int warning_time = 0; ++double warning_time = 0; + int check_warning_time = FALSE; +-int critical_time = 0; ++double critical_time = 0; + int check_critical_time = FALSE; + int verbose = 0; + int use_ssl = FALSE; +@@ -432,9 +432,9 @@ + elapsed_time = (double)microsec / 1.0e6; + + if (result == STATE_OK) { +- if (check_critical_time && elapsed_time > (double) critical_time) ++ if (check_critical_time && elapsed_time > critical_time) + result = STATE_CRITICAL; +- else if (check_warning_time && elapsed_time > (double) warning_time) ++ else if (check_warning_time && elapsed_time > warning_time) + result = STATE_WARNING; + } + +@@ -565,21 +565,19 @@ + nresponses++; + break; + case 'c': /* critical time threshold */ +- if (is_intnonneg (optarg)) { +- critical_time = atoi (optarg); +- check_critical_time = TRUE; +- } ++ if (!is_nonnegative (optarg)) ++ usage4 (_("Critical time must be a positive")); + else { +- usage4 (_("Critical time must be a positive integer")); ++ critical_time = strtod (optarg, NULL); ++ check_critical_time = TRUE; + } + break; + case 'w': /* warning time threshold */ +- if (is_intnonneg (optarg)) { +- warning_time = atoi (optarg); +- check_warning_time = TRUE; +- } ++ if (!is_nonnegative (optarg)) ++ usage4 (_("Warning time must be a positive")); + else { +- usage4 (_("Warning time must be a positive integer")); ++ warning_time = strtod (optarg, NULL); ++ check_warning_time = TRUE; + } + break; + case 'v': /* verbose */ -- cgit v1.2.3-74-g34f1