[Nagiosplug-devel] check_tcp and local sockets

sean finney seanius at seanius.net
Sun Oct 30 02:28:00 CEST 2005


hey alex,

On Sat, Oct 29, 2005 at 09:24:04PM +0300, Alex Samorukov wrote:
> 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:

> -       else if (strncmp(SERVICE, "CLAMD", 5)) {
> +       else if (!strncmp(SERVICE, "CLAMD", 5)) {

d'oh.  that's what i get for manually merging in the patch :)

> -       else if (is_host (optarg) == FALSE && optarg[0] != '/')
> +       else if (is_host (server_address) == FALSE && server_address[0]
> != '/')

yeah.  and that's what i get for making a code optimization without
double checking myself.  anyway, both of these are fixed in cvs now.

on a related note, i believe that providing this feature also provides
a much better/thorough way to test the tcp-based plugins.  i don't know
much about how the test suite works, but it wouldn't be too hard to
write a test program that creates a unix domain socket and spoke
the proper things to the plugins...


	sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20051030/59f74b81/attachment.sig>


More information about the Devel mailing list