aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_tcp.c
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> 2007-02-01 06:53:12 +0000
committerGravatar Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> 2007-02-01 06:53:12 +0000
commitb0307d7a99c56b2d77bc80f7f931e7016b9d4e39 (patch)
treebd5bc1bd65baec6bb56f1f51258ab6923c7c6462 /plugins/check_tcp.c
parent94c3a8e7444e67202fb46fb052b5e87012c2c409 (diff)
downloadmonitoring-plugins-b0307d7a99c56b2d77bc80f7f931e7016b9d4e39.tar.gz
Fix progname being partly set to upper case
Change formating of invalid hostname output git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1604 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r--plugins/check_tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index d4d03223..66bf4489 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -112,7 +112,7 @@ main (int argc, char **argv)
len = strlen(progname);
if(len > 6 && !memcmp(progname, "check_", 6)) {
- SERVICE = progname + 6;
+ SERVICE = strdup(progname + 6);
for(i = 0; i < len - 6; i++)
SERVICE[i] = toupper(SERVICE[i]);
}
@@ -588,7 +588,7 @@ process_arguments (int argc, char **argv)
if (server_address == NULL)
usage4 (_("You must provide a server address"));
else if (server_address[0] != '/' && is_host (server_address) == FALSE)
- die (STATE_CRITICAL, "%s: %s - %s\n", progname, _("Invalid hostname, address or socket"), server_address);
+ die (STATE_CRITICAL, "%s %s - %s: %s\n", SERVICE, state_text(STATE_CRITICAL), _("Invalid hostname, address or socket"), server_address);
return TRUE;
}