[Nagiosplug-devel] check_udp

sean finney seanius at seanius.net
Thu Mar 23 15:30:10 CET 2006


On Thu, Mar 23, 2006 at 03:46:01PM -0500, sean finney wrote:
> or something might trigger a response, but i think it would be
> better (cleaner and more appropriate) to just have check_udp
> complain and die if it has nothing to send/receive.  

attached is a patch to check_tcp that does what i just described.
i haven't comitted it only because it's not clear that there
was an agreement on the matter.

but in any case i think we can safely discard check_udp.c, right?


	sean
-------------- next part --------------
Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.76
diff -u -r1.76 check_tcp.c
--- check_tcp.c	22 Mar 2006 15:45:20 -0000	1.76
+++ check_tcp.c	23 Mar 2006 23:25:46 -0000
@@ -205,6 +205,10 @@
 	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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20060323/93a12eba/attachment.sig>


More information about the Devel mailing list