aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_tcp.c
diff options
context:
space:
mode:
authorGravatar M. Sean Finney <seanius@users.sourceforge.net> 2005-10-30 10:25:26 +0000
committerGravatar M. Sean Finney <seanius@users.sourceforge.net> 2005-10-30 10:25:26 +0000
commit27675e4e6b6c36a5c94bad1bdece3ebce3cbb46f (patch)
treed9f4e2ffa07c1124794fc6479ea0bf09dd11590c /plugins/check_tcp.c
parente082e8565f5f54916511f01eabfab1427503813d (diff)
downloadmonitoring-plugins-27675e4e6b6c36a5c94bad1bdece3ebce3cbb46f.tar.gz
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
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r--plugins/check_tcp.c6
1 files changed, 3 insertions, 3 deletions
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;
}