Code

Don't try to print `optarg' (which will be a NULL pointer) if an unknown
[nagiosplug.git] / plugins / check_mysql.c
index a47572d93162902678f4fbde3a3bcefbcd5c760b..573ec96a8a4aecd6b266063f389cf0ba57f2fa39 100644 (file)
@@ -1,17 +1,39 @@
 /******************************************************************************
 *
-* CHECK_MYSQL.C
+* Nagios check_mysql plugin
 *
-* Program: Mysql plugin for Nagios
 * License: GPL
-* Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)
-*  portions (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
+*  Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)
+*  Copyright (c) 1999-2006 nagios-plugins team
+*  Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
 *
-* $Id$
+* Last Modified: $Date$
 *
 * Description:
 *
-* This plugin is for testing a mysql server.
+* This file contains the check_mysql plugin
+*
+*  This program tests connections to a mysql server
+*
+*
+* License Information:
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+* $Id$
+*
 ******************************************************************************/
 
 const char *progname = "check_mysql";
@@ -23,6 +45,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
 #include "common.h"
 #include "utils.h"
+#include "utils_base.h"
 #include "netutils.h"
 
 #include <mysql.h>
@@ -285,7 +308,7 @@ process_arguments (int argc, char **argv)
                        verbose++;
                        break;
                case '?':                                                                       /* help */
-                       usage2 (_("Unknown argument"), optarg);
+                       usage5 ();
                }
        }