[Nagiosplug-devel] check_tcp and local sockets
Alex Samorukov
ml at os2.kiev.ua
Sat Oct 29 11:25:09 CEST 2005
Hi all.
Big thanks to Seanius for looking into my patch. I tried latest CVS and
found some errors on it.
This small error make check_tcp completely unusable (core on startup).
Here is a correction:
samm>~/src/nagios-plugins/nagiosplug/plugins: cvs diff -u
cvs diff: Diffing .
Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.70
diff -u -r1.70 check_tcp.c
--- check_tcp.c 25 Oct 2005 10:38:02 -0000 1.70
+++ check_tcp.c 29 Oct 2005 18:15:10 -0000
@@ -177,7 +177,7 @@
QUIT = "QUIT\r\n";
PORT = 119;
}
- else if (strncmp(SERVICE, "CLAMD", 5)) {
+ else if (!strncmp(SERVICE, "CLAMD", 5)) {
SEND = "PING";
EXPECT = "PONG";
QUIT = NULL;
@@ -550,7 +550,7 @@
if (server_address == NULL)
usage4 (_("You must provide a server address"));
- else if (is_host (optarg) == FALSE && optarg[0] != '/')
+ else if (is_host (server_address) == FALSE && server_address[0]
!= '/')
usage2 (_("Invalid hostname, address, or socket"), optarg);
return TRUE;
More information about the Devel
mailing list