[Nagiosplug-checkins] nagiosplug/plugins check_tcp.c,1.76,1.77

Ton Voon tonvoon at users.sourceforge.net
Fri Mar 24 08:13:08 CET 2006


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30273

Modified Files:
	check_tcp.c 
Log Message:
udp checks require and send and receive option. Tests updated so if
nc is available, will check send and receive working correctly


Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- check_tcp.c	22 Mar 2006 15:45:20 -0000	1.76
+++ check_tcp.c	24 Mar 2006 16:12:05 -0000	1.77
@@ -198,13 +198,17 @@
 
 	if(flags & FLAG_VERBOSE) {
 		printf("Using service %s\n", SERVICE);
-		printf("Port: %d\n", PORT);
+		printf("Port: %d\n", server_port);
 		printf("flags: 0x%x\n", (int)flags);
 	}
 
 	if(EXPECT && !server_expect_count)
 		server_expect_count++;
 
+	if(PROTOCOL==IPPROTO_UDP && !(server_expect_count && server_send)){
+		usage(_("With UDP checks, a send/expect string must be specified."));
+	}
+
 	/* set up the timer */
 	signal (SIGALRM, socket_timeout_alarm_handler);
 	alarm (socket_timeout);





More information about the Commits mailing list