[Nagiosplug-devel] patch for plugin/check_real.c

Masayoshi Sekimura sekimura at iij-mc.co.jp
Sun Dec 21 08:06:27 CET 2003


Hi nagiosplug-devel,

Here is a patch for plugin/check_real.c.

 - "OPTIONS * RTSP/1.0" is useful when talk with NetCache
   It has no harm when direcoty connect with RealServer or QTSS.

 - \r\n patch for the DESCRIBE rtsp method.

best regards,

-sekimura
-------------- next part --------------
--- check_real.c.orig	Tue Jun 10 13:56:47 2003
+++ check_real.c	Fri Dec 19 14:49:25 2003
@@ -97,7 +97,7 @@
 	/* Part I - Server Check */
 
 	/* send the OPTIONS request */
-	sprintf (buffer, "OPTIONS rtsp://%s:%d RTSP/1.0\r\n", host_name, server_port);
+	sprintf (buffer, "OPTIONS * RTSP/1.0\r\n");
 	result = send (sd, buffer, strlen (buffer), 0);
 
 	/* send the header sync */
@@ -167,16 +167,16 @@
 		/* Part I - Server Check */
 
 		/* send the OPTIONS request */
-		sprintf (buffer, "DESCRIBE rtsp://%s:%d%s RTSP/1.0\n", host_name,
+		sprintf (buffer, "DESCRIBE rtsp://%s:%d%s RTSP/1.0\r\n", host_name,
 						 server_port, server_url);
 		result = send (sd, buffer, strlen (buffer), 0);
 
 		/* send the header sync */
-		sprintf (buffer, "CSeq: 2\n");
+		sprintf (buffer, "CSeq: 2\r\n");
 		result = send (sd, buffer, strlen (buffer), 0);
 
 		/* send a newline so the server knows we're done with the request */
-		sprintf (buffer, "\n");
+		sprintf (buffer, "\r\n");
 		result = send (sd, buffer, strlen (buffer), 0);
 
 		/* watch for the REAL connection string */


More information about the Devel mailing list