diff options
-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 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; } diff --git a/plugins/t/check_jabber.t b/plugins/t/check_jabber.t index 07742214..6a3d4ef7 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/'; 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; |