diff options
author | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-01 23:54:51 +0000 |
---|---|---|
committer | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-01 23:54:51 +0000 |
commit | d19edd4043c498626fe68308005947975ef0a697 (patch) | |
tree | 7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/check_tcp.c | |
parent | 1d8128e328f714258b7fec0c62245e1d187e0439 (diff) | |
download | monitoring-plugins-d19edd4043c498626fe68308005947975ef0a697.tar.gz |
standardize localization string
standardize unknow arguments
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r-- | plugins/check_tcp.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 7cef8bb9..285932d5 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -14,6 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + $Id$ + *****************************************************************************/ /* progname "check_tcp" changes depending on symlink called */ @@ -100,9 +102,6 @@ char *buffer; - - - int main (int argc, char **argv) { @@ -241,7 +240,7 @@ main (int argc, char **argv) status = strdup (""); if (process_arguments (argc, argv) == ERROR) - usage (_("Could not parse arguments\n")); + usage (_("check_tcp: could not parse arguments\n")); /* use default expect if none listed in process_arguments() */ if (EXPECT && server_expect_count == 0) { @@ -389,7 +388,6 @@ main (int argc, char **argv) return result; } - @@ -481,12 +479,12 @@ process_arguments (int argc, char **argv) break; case 'H': /* hostname */ if (is_host (optarg) == FALSE) - usage2 (_("invalid host name or address"), optarg); + usage2 (_("invalid hostname/address"), optarg); server_address = optarg; break; case 'c': /* critical */ if (!is_intnonneg (optarg)) - usage (_("Critical threshold must be a nonnegative integer\n")); + usage (_("Critical threshold must be a positive integer\n")); else critical_time = strtod (optarg, NULL); check_critical_time = TRUE; @@ -496,7 +494,7 @@ process_arguments (int argc, char **argv) break; case 'w': /* warning */ if (!is_intnonneg (optarg)) - usage (_("Warning threshold must be a nonnegative integer\n")); + usage (_("Warning threshold must be a positive integer\n")); else warning_time = strtod (optarg, NULL); check_warning_time = TRUE; @@ -517,7 +515,7 @@ process_arguments (int argc, char **argv) break; case 'p': /* port */ if (!is_intpos (optarg)) - usage (_("Server port must be a positive integer\n")); + usage (_("Port must be a positive integer\n")); else server_port = atoi (optarg); break; @@ -548,7 +546,7 @@ process_arguments (int argc, char **argv) else if (!strncmp(optarg,"crit",4)) econn_refuse_state = STATE_CRITICAL; else - usage (_("Refuse mut be one of ok, warn, crit\n")); + usage (_("Refuse must be one of ok, warn, crit\n")); break; case 'd': if (is_intpos (optarg)) @@ -578,7 +576,8 @@ process_arguments (int argc, char **argv) return OK; } - + + #ifdef HAVE_SSL int @@ -634,6 +633,8 @@ connect_SSL (void) } #endif + + #ifdef HAVE_SSL int check_certificate (X509 ** certificate) @@ -710,6 +711,8 @@ check_certificate (X509 ** certificate) } #endif + + int my_recv (void) { @@ -731,9 +734,6 @@ my_recv (void) - - - void print_help (void) { @@ -790,7 +790,6 @@ print_help (void) - void print_usage (void) { |