From 1e2982f0723fe7e884d63212530ad9c9d491a2f5 Mon Sep 17 00:00:00 2001 From: Matthias Eble Date: Tue, 29 May 2007 19:11:42 +0000 Subject: No more warn/crit values in performance data if -w and -c are not specified. Thanks to Simon Bellwood (#1181554) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1722 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 57e1f0d..a977077 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -366,16 +366,16 @@ main (int argc, char **argv) if(match == -2) printf ("|%s", fperfdata ("time", elapsed_time, "s", - TRUE, 0, - TRUE, 0, + (flags & FLAG_TIME_WARN ? TRUE : FALSE), 0, + (flags & FLAG_TIME_CRIT ? TRUE : FALSE), 0, TRUE, 0, TRUE, socket_timeout) ); else printf("|%s", fperfdata ("time", elapsed_time, "s", - TRUE, warning_time, - TRUE, critical_time, + (flags & FLAG_TIME_WARN ? TRUE : FALSE), warning_time, + (flags & FLAG_TIME_CRIT ? TRUE : FALSE), critical_time, TRUE, 0, TRUE, socket_timeout) ); -- cgit v0.10-9-g596f