From 65e066acfa53f01abeab0ebf3f319110a104aaa1 Mon Sep 17 00:00:00 2001
From: Ton Voon <tonvoon@users.sourceforge.net>
Date: Wed, 19 Dec 2007 10:08:06 +0000
Subject: check_tcp now returns UNKNOWN with an invalid hostname on command
 line

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1879 f882894a-f735-0410-b71e-b25c423dba1c

diff --git a/NEWS b/NEWS
index 37d2ac1..372498e 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ This file documents the major additions and syntax changes between releases.
 
 1.4.12 or 1.5 ??
 	Added ./check_nt -v INSTANCES to count number of instances (Alessandro Ren)
+	check_tcp now returns UNKNOWN with invalid hostname
 
 1.4.11 13th December 2007
 	Fixed check_http regression in 1.4.10 where following redirects to
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index e502c0d..7e47009 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -584,7 +584,7 @@ process_arguments (int argc, char **argv)
 	if (server_address == NULL)
 		usage4 (_("You must provide a server address"));
 	else if (server_address[0] != '/' && is_host (server_address) == FALSE)
-		die (STATE_CRITICAL, "%s %s - %s: %s\n", SERVICE, state_text(STATE_CRITICAL), _("Invalid hostname, address or socket"), server_address);
+		die (STATE_UNKNOWN, "%s %s - %s: %s\n", SERVICE, state_text(STATE_UNKNOWN), _("Invalid hostname, address or socket"), server_address);
 
 	return TRUE;
 }
-- 
cgit v0.10-9-g596f

