From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/35776-check_tcp.diff | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 web/attachments/35776-check_tcp.diff (limited to 'web/attachments/35776-check_tcp.diff') diff --git a/web/attachments/35776-check_tcp.diff b/web/attachments/35776-check_tcp.diff new file mode 100644 index 0000000..b461a63 --- /dev/null +++ b/web/attachments/35776-check_tcp.diff @@ -0,0 +1,26 @@ +--- check_tcp.c.orig Wed Nov 20 12:15:44 2002 ++++ check_tcp.c Wed Nov 20 12:15:03 2002 +@@ -241,19 +241,20 @@ + + /* watch for the expect string */ + #ifdef HAVE_SSL +- if (use_ssl && SSL_read (ssl, buffer, MAX_INPUT_BUFFER - 1)>=0) ++ if (use_ssl && SSL_read (ssl, buffer, MAX_INPUT_BUFFER - 1)>0) + status = strscat(status,buffer); + else + #endif + { +- if (recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0) >= 0) ++ if (recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0) > 0) + status = strscat (status, buffer); + } +- strip (status); + + /* return a CRITICAL status if we couldn't read any data */ + if (status == NULL) + terminate (STATE_CRITICAL, "No data received from host\n"); ++ ++ strip (status); + + if (status && verbose) + printf ("%s\n", status); -- cgit v1.2.3-74-g34f1