summaryrefslogtreecommitdiffstats
path: root/web/attachments/35776-check_tcp.diff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/35776-check_tcp.diff
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/35776-check_tcp.diff')
-rw-r--r--web/attachments/35776-check_tcp.diff26
1 files changed, 26 insertions, 0 deletions
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 @@
1--- check_tcp.c.orig Wed Nov 20 12:15:44 2002
2+++ check_tcp.c Wed Nov 20 12:15:03 2002
3@@ -241,19 +241,20 @@
4
5 /* watch for the expect string */
6 #ifdef HAVE_SSL
7- if (use_ssl && SSL_read (ssl, buffer, MAX_INPUT_BUFFER - 1)>=0)
8+ if (use_ssl && SSL_read (ssl, buffer, MAX_INPUT_BUFFER - 1)>0)
9 status = strscat(status,buffer);
10 else
11 #endif
12 {
13- if (recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0) >= 0)
14+ if (recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0) > 0)
15 status = strscat (status, buffer);
16 }
17- strip (status);
18
19 /* return a CRITICAL status if we couldn't read any data */
20 if (status == NULL)
21 terminate (STATE_CRITICAL, "No data received from host\n");
22+
23+ strip (status);
24
25 if (status && verbose)
26 printf ("%s\n", status);