diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index c0ddc70326231fd23eb6b42207354b52b63ca7de..b6c60c244ebf5ea73446fc28ca8a0a017e3fb3f4 100644 (file)
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) != TRUE)
+ if (process_arguments (argc, argv) == ERROR)
usage4 (_("Could not parse arguments"));
/* initialize the HELO command with the localhostname */
microsec = deltime (tv);
elapsed_time = (double)microsec / 1.0e6;
- if (result == STATE_OK)
+ if (result == STATE_OK) {
if (check_critical_time && elapsed_time > (double) critical_time)
result = STATE_CRITICAL;
else if (check_warning_time && elapsed_time > (double) warning_time)
result = STATE_WARNING;
+ }
printf (_("SMTP %s - %.3f sec. response time%s%s|%s\n"),
state_text (result), elapsed_time,
if (is_intpos (optarg))
server_port = atoi (optarg);
else
- usage (_("Port must be a positive integer\n"));
+ usage4 (_("Port must be a positive integer"));
break;
case 'f': /* from argument */
from_arg = optarg;
check_critical_time = TRUE;
}
else {
- usage (_("Critical time must be a positive integer\n"));
+ usage4 (_("Critical time must be a positive integer"));
}
break;
case 'w': /* warning time threshold */
check_warning_time = TRUE;
}
else {
- usage (_("Warning time must be a positive integer\n"));
+ usage4 (_("Warning time must be a positive integer"));
}
break;
case 'v': /* verbose */
socket_timeout = atoi (optarg);
}
else {
- usage (_("Time interval must be a positive integer\n"));
+ usage4 (_("Time interval must be a positive integer"));
}
break;
case '4':
#ifdef USE_IPV6
address_family = AF_INET6;
#else
- usage (_("IPv6 support not available\n"));
+ usage4 (_("IPv6 support not available"));
#endif
break;
case 'V': /* version */
printf ("Copyright (c) 1999-2001 Ethan Galstad <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
- printf(_("\
-This plugin will attempt to open an SMTP connection with the host.\n\n"));
+ printf(_("This plugin will attempt to open an SMTP connection with the host.\n\n"));
print_usage ();
{
printf ("\
Usage: %s -H host [-p port] [-e expect] [-C command] [-f from addr]\n\
- [-w warn] [-c crit] [-t timeout] [-n] [-v] [-4|-6]\n", progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ [-w warn] [-c crit] [-t timeout] [-n] [-v] [-4|-6]\n", progname);
}