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/83489-check_smtp.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 web/attachments/83489-check_smtp.patch (limited to 'web/attachments/83489-check_smtp.patch') diff --git a/web/attachments/83489-check_smtp.patch b/web/attachments/83489-check_smtp.patch new file mode 100644 index 0000000..cf3fd67 --- /dev/null +++ b/web/attachments/83489-check_smtp.patch @@ -0,0 +1,24 @@ +--- plugins/check_smtp.c.orig Mon Apr 12 20:21:34 2004 ++++ plugins/check_smtp.c Mon Apr 12 22:29:17 2004 +@@ -219,15 +219,16 @@ + microsec = deltime (tv); + elapsed_time = (double)microsec / 1.0e6; + +- if (check_critical_time && elapsed_time > (double) critical_time) +- result = STATE_CRITICAL; +- else if (check_warning_time && elapsed_time > (double) warning_time) +- result = STATE_WARNING; ++ if (result == STATE_OK) ++ if (check_critical_time && elapsed_time > (double) critical_time) ++ result = STATE_CRITICAL; ++ else if (check_warning_time && elapsed_time > (double) warning_time) ++ result = STATE_WARNING; + + printf (_("SMTP %s - %.3f sec. response time%s%s|%s\n"), + state_text (result), elapsed_time, + verbose?", ":"", verbose?buffer:"", +- perfdata ("time", microsec, "us", ++ fperfdata ("time", elapsed_time, "s", + (int)check_warning_time, warning_time, + (int)check_critical_time, critical_time, + TRUE, 0, FALSE, 0)); -- cgit v1.2.3-74-g34f1