Code

Fix includes for gettext
[nagiosplug.git] / plugins / check_nt.c
index 67c3017e1ec4492a4256b9653f9f2a7ed631fd92..f76a52a603bd1e3050dd1bb92b8ce7a2361cb8cd 100644 (file)
@@ -103,7 +103,7 @@ int main(int argc, char **argv){
        unsigned long utilization;
        unsigned long uptime;
        unsigned long age_in_minutes;
-       double counter_value;
+       double counter_value = 0.0;
        int offset=0;
        int updays=0;
        int uphours=0;
@@ -116,7 +116,7 @@ int main(int argc, char **argv){
        bindtextdomain (PACKAGE, LOCALEDIR);
        textdomain (PACKAGE);
 
-       if(process_arguments(argc,argv) != TRUE)
+       if(process_arguments(argc,argv) == ERROR)
                usage4 (_("Could not parse arguments"));
 
        /* initialize alarm signal handling */
@@ -608,11 +608,15 @@ void preparelist(char *string) {
 void print_help(void)
 {
        print_revision(progname,revision);
-       printf (_("\
-Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n\n\
-This plugin collects data from the NSClient service running on a\n\
-Windows NT/2000/XP server.\n\n"));
+       
+       printf ("Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n");
+       printf (COPYRIGHT, copyright, email);
+       
+       printf (_("This plugin collects data from the NSClient service running on a\n\
+Windows NT/2000/XP/2003 server.\n\n"));
+
        print_usage();
+       
   printf (_("\nOptions:\n\
 -H, --hostname=HOST\n\
   Name of the host to check\n\
@@ -629,8 +633,8 @@ Windows NT/2000/XP server.\n\n"));
 -h, --help\n\
   Print this help screen\n\
 -V, --version\n\
-  Print version information\n"),
-               PORT, DEFAULT_SOCKET_TIMEOUT);
+  Print version information\n"), PORT, DEFAULT_SOCKET_TIMEOUT);
+       
   printf (_("\
 -v, --variable=STRING\n\
   Variable to check.  Valid variables are:\n"));
@@ -684,5 +688,5 @@ void print_usage(void)
 {
        printf("\
 Usage: %s -H host -v variable [-p port] [-w warning] [-c critical]\n\
-          [-l params] [-d SHOWALL] [-t timeout]\n", progname);
+                [-l params] [-d SHOWALL] [-t timeout]\n", progname);
 }