Code

Add another error string match from Pasi Tiittanen
[nagiosplug.git] / plugins / check_radius.c
index 405b417b1e0a9d0c846a820cfd2753fb096f4d97..9e1046865e2e4e0a574db7cb2bdc786e460f37f4 100644 (file)
@@ -26,6 +26,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
 #include "common.h"
 #include "utils.h"
 #include "netutils.h"
+
 #include <radiusclient.h>
 
 int process_arguments (int, char **);
@@ -104,7 +105,7 @@ main (int argc, char **argv)
        UINT4 service;
        char msg[BUFFER_LEN];
        SEND_DATA data;
-       int result;
+       int result = STATE_UNKNOWN;
        UINT4 client_id;
        char *str;
 
@@ -112,8 +113,8 @@ main (int argc, char **argv)
        bindtextdomain (PACKAGE, LOCALEDIR);
        textdomain (PACKAGE);
 
-       if (process_arguments (argc, argv) != TRUE)
-               usage (_("check_radius: could not parse arguments\n"));
+       if (process_arguments (argc, argv) == ERROR)
+               usage4 (_("Could not parse arguments"));
 
        str = strdup ("dictionary");
        if ((config_file && rc_read_config (config_file)) ||
@@ -335,6 +336,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\
-  [-t timeout] [-r retries] [-e expect]\n", progname);
-       printf (_(UT_HLP_VRS), progname, progname);
+                  [-t timeout] [-r retries] [-e expect]\n", progname);
 }