diff options
author | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-25 23:17:46 +0000 |
---|---|---|
committer | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-25 23:17:46 +0000 |
commit | e9ccc6b21a1152bbf150302c4a29a6df79d75bd7 (patch) | |
tree | 91bf1ebb6f927fd628b298df2ac5a89580282591 /plugins/check_ldap.c | |
parent | 71656b2aafffb69716620bf08cce76c925dc8fa3 (diff) | |
download | monitoring-plugins-e9ccc6b21a1152bbf150302c4a29a6df79d75bd7.tar.gz |
various fixes for localization
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_ldap.c')
-rw-r--r-- | plugins/check_ldap.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index 582c9564..4f143280 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c @@ -134,11 +134,11 @@ main (int argc, char *argv[]) if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS) { /*ldap_perror(ld, "ldaps_option"); */ - printf ("Could not init TLS at port %i!\n", ld_port); + printf (_("Could not init TLS at port %i!\n"), ld_port); return STATE_CRITICAL; } #else - printf ("TLS not supported by the libraries!\n", ld_port); + printf (_("TLS not supported by the libraries!\n"), ld_port); return STATE_CRITICAL; #endif /* LDAP_OPT_X_TLS */ } else { @@ -157,11 +157,11 @@ main (int argc, char *argv[]) if (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS) { /*ldap_perror(ld, "ldap_start_tls"); */ - printf ("Could not init startTLS at port %i!\n", ld_port); + printf (_("Could not init startTLS at port %i!\n"), ld_port); return STATE_CRITICAL; } #else - printf ("startTLS not supported by the library, needs LDAPv3!\n"); + printf (_("startTLS not supported by the library, needs LDAPv3!\n")); return STATE_CRITICAL; #endif /* HAVE_LDAP_START_TLS_S */ } @@ -312,9 +312,7 @@ process_arguments (int argc, char **argv) #endif break; default: - printf (_("%s: Unknown argument: %s\n\n"), progname, optarg); - print_usage (); - exit (STATE_UNKNOWN); + usage2 (_("Unknown argument"), optarg); } } @@ -328,21 +326,20 @@ process_arguments (int argc, char **argv) return validate_arguments (); } + int validate_arguments () { if (ld_host==NULL || strlen(ld_host)==0) - usage (_("please specify the host name\n")); + usage4 (_("Please specify the host name\n")); if (ld_base==NULL || strlen(ld_base)==0) - usage (_("please specify the LDAP base\n")); + usage4 (_("Please specify the LDAP base\n")); return OK; - } - void print_help (void) { @@ -392,7 +389,6 @@ print_help (void) } - void print_usage (void) { |