diff --git a/plugins/check_real.c b/plugins/check_real.c
index ef3581b9508a361d63255c017caa363eec88b3c7..1744b329a81ba11d90e6b9a3a39cfd6a18163758 100644 (file)
--- a/plugins/check_real.c
+++ b/plugins/check_real.c
int server_port = PORT;
char *server_address = "";
char *host_name = "";
-char *server_url = "/";
+char *server_url = NULL;
char *server_expect = EXPECT;
int warning_time = 0;
int check_warning_time = FALSE;
/* Part I - Server Check */
/* send the OPTIONS request */
- sprintf (buffer, "OPTIONS rtsp://%s:%d RTSP/1.0\n", host_name, server_port);
+ sprintf (buffer, "OPTIONS rtsp://%s:%d RTSP/1.0\r\n", host_name, server_port);
result = send (sd, buffer, strlen (buffer), 0);
/* send the header sync */
- sprintf (buffer, "CSeq: 1\n");
+ sprintf (buffer, "CSeq: 1\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 */
}
/* Part II - Check stream exists and is ok */
- if (result == STATE_OK) {
+ if ((result == STATE_OK )&& (server_url != NULL) ) {
/* Part I - Server Check */
{
int c;
-#ifdef HAVE_GETOPT_H
int option_index = 0;
static struct option long_options[] = {
{"hostname", required_argument, 0, 'H'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
-#endif
if (argc < 2)
return ERROR;
}
while (1) {
-#ifdef HAVE_GETOPT_H
- c =
- getopt_long (argc, argv, "+hVI:H:e:u:p:w:c:t:", long_options,
+ c = getopt_long (argc, argv, "+hVI:H:e:u:p:w:c:t:", long_options,
&option_index);
-#else
- c = getopt (argc, argv, "+?hVI:H:e:u:p:w:c:t");
-#endif
if (c == -1 || c == EOF)
break;