diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-02-01 06:53:12 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-02-01 06:53:12 (GMT) |
commit | b0307d7a99c56b2d77bc80f7f931e7016b9d4e39 (patch) | |
tree | bd5bc1bd65baec6bb56f1f51258ab6923c7c6462 /plugins | |
parent | 94c3a8e7444e67202fb46fb052b5e87012c2c409 (diff) | |
download | monitoring-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')
-rw-r--r-- | plugins/check_tcp.c | 4 | ||||
-rw-r--r-- | plugins/t/check_jabber.t | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index d4d0322..66bf448 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -112,7 +112,7 @@ main (int argc, char **argv) | |||
112 | 112 | ||
113 | len = strlen(progname); | 113 | len = strlen(progname); |
114 | if(len > 6 && !memcmp(progname, "check_", 6)) { | 114 | if(len > 6 && !memcmp(progname, "check_", 6)) { |
115 | SERVICE = progname + 6; | 115 | SERVICE = strdup(progname + 6); |
116 | for(i = 0; i < len - 6; i++) | 116 | for(i = 0; i < len - 6; i++) |
117 | SERVICE[i] = toupper(SERVICE[i]); | 117 | SERVICE[i] = toupper(SERVICE[i]); |
118 | } | 118 | } |
@@ -588,7 +588,7 @@ process_arguments (int argc, char **argv) | |||
588 | if (server_address == NULL) | 588 | if (server_address == NULL) |
589 | usage4 (_("You must provide a server address")); | 589 | usage4 (_("You must provide a server address")); |
590 | else if (server_address[0] != '/' && is_host (server_address) == FALSE) | 590 | else if (server_address[0] != '/' && is_host (server_address) == FALSE) |
591 | die (STATE_CRITICAL, "%s: %s - %s\n", progname, _("Invalid hostname, address or socket"), server_address); | 591 | die (STATE_CRITICAL, "%s %s - %s: %s\n", SERVICE, state_text(STATE_CRITICAL), _("Invalid hostname, address or socket"), server_address); |
592 | 592 | ||
593 | return TRUE; | 593 | return TRUE; |
594 | } | 594 | } |
diff --git a/plugins/t/check_jabber.t b/plugins/t/check_jabber.t index 0774221..6a3d4ef 100644 --- a/plugins/t/check_jabber.t +++ b/plugins/t/check_jabber.t | |||
@@ -34,7 +34,7 @@ my $jabberOK = '/JABBER OK\s-\s\d+\.\d+\ssecond response time on port 5222/'; | |||
34 | 34 | ||
35 | my $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/'; | 35 | my $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/'; |
36 | 36 | ||
37 | my $jabberInvalid = '/check_JABBER: Invalid hostname, address or socket\s-\s.+/'; | 37 | my $jabberInvalid = '/JABBER CRITICAL - Invalid hostname, address or socket:\s.+/'; |
38 | 38 | ||
39 | my $r; | 39 | my $r; |
40 | 40 | ||