From 27675e4e6b6c36a5c94bad1bdece3ebce3cbb46f Mon Sep 17 00:00:00 2001 From: "M. Sean Finney" Date: Sun, 30 Oct 2005 10:25:26 +0000 Subject: fixes for some bugs found in my merging of the tcp socket patch git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1264 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_tcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 3aef1e7e..015ccd46 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -177,7 +177,7 @@ main (int argc, char **argv) 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,8 +550,8 @@ process_arguments (int argc, char **argv) if (server_address == NULL) usage4 (_("You must provide a server address")); - else if (is_host (optarg) == FALSE && optarg[0] != '/') - usage2 (_("Invalid hostname, address, or socket"), optarg); + else if (is_host (server_address) == FALSE && server_address[0] != '/') + usage2 (_("Invalid hostname, address, or socket"), server_address); return TRUE; } -- cgit v1.2.3-74-g34f1