summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 94c3a8e)
raw | patch | inline | side by side (parent: 94c3a8e)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Thu, 1 Feb 2007 06:53:12 +0000 (06:53 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Thu, 1 Feb 2007 06:53:12 +0000 (06:53 +0000) |
Change formating of invalid hostname output
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1604 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1604 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_tcp.c | patch | blob | history | |
plugins/t/check_jabber.t | patch | blob | history |
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index d4d032238f17c626076ae809ee6967ebd01259ac..66bf44892bc9b50a8844c9cd6c927a3a111278e8 100644 (file)
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
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]);
}
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;
}
index 077422148bd0cef80c4a44b9da534ed1850834cb..6a3d4ef7676a03ae5a2bded1c6e84d9bad77338e 100644 (file)
--- a/plugins/t/check_jabber.t
+++ b/plugins/t/check_jabber.t
my $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/';
-my $jabberInvalid = '/check_JABBER: Invalid hostname, address or socket\s-\s.+/';
+my $jabberInvalid = '/JABBER CRITICAL - Invalid hostname, address or socket:\s.+/';
my $r;