From 386b791af2a5c9d95531d2ca047dd8ffc12bcb2e Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Tue, 24 Mar 2009 21:40:06 -0400 Subject: Make socket alarm handler customisable (like c459ca07) --- plugins/netutils.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/netutils.c') diff --git a/plugins/netutils.c b/plugins/netutils.c index 6082cae0..1d6100ab 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -32,7 +32,6 @@ #include "common.h" #include "netutils.h" -unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT; int econn_refuse_state = STATE_CRITICAL; int was_refused = FALSE; #if USE_IPV6 @@ -46,11 +45,11 @@ void socket_timeout_alarm_handler (int sig) { if (sig == SIGALRM) - printf (_("CRITICAL - Socket timeout after %d seconds\n"), socket_timeout); + printf (_("%s - Socket timeout after %d seconds\n"), state_text(socket_timeout_state), socket_timeout); else - printf (_("CRITICAL - Abnormal timeout after %d seconds\n"), socket_timeout); + printf (_("%s - Abnormal timeout after %d seconds\n"), state_text(socket_timeout_state), socket_timeout); - exit (STATE_CRITICAL); + exit (socket_timeout_state); } -- cgit v1.2.3