Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1181/plugins
Modified Files:
check_mysql.c
Log Message:
Fix argument processing (Felix Frank - 1690697)
Index: check_mysql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- check_mysql.c 28 Jan 2007 21:46:40 -0000 1.34
+++ check_mysql.c 29 Mar 2007 17:58:28 -0000 1.35
@@ -318,18 +318,18 @@
while ( argc > c ) {
- if (strlen(db_host) == 0)
+ if (db_host == NULL)
if (is_host (argv[c])) {
db_host = argv[c++];
}
else {
- usage2 (_("Invalid hostname/address"), optarg);
+ usage2 (_("Invalid hostname/address"), argv[c]);
}
- else if (strlen(db_user) == 0)
+ else if (db_user == NULL)
db_user = argv[c++];
- else if (strlen(db_pass) == 0)
+ else if (db_pass == NULL)
db_pass = argv[c++];
- else if (strlen(db) == 0)
+ else if (db == NULL)
db = argv[c++];
else if (is_intnonneg (argv[c]))
db_port = atoi (argv[c++]);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|