[Nagiosplug-checkins] CVS: nagiosplug/plugins check_mysql.c,1.6,1.7

Ton Voon tonvoon at users.sourceforge.net
Mon Feb 10 16:48:05 CET 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv22448

Modified Files:
	check_mysql.c 
Log Message:
Patch by Dave Viner for seg fault on RH 7.3 (655903)


Index: check_mysql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** check_mysql.c	29 Jan 2003 06:38:00 -0000	1.6
--- check_mysql.c	11 Feb 2003 00:47:47 -0000	1.7
***************
*** 190,212 ****
  	c = optind;
  
! 	if (strlen(db_host) == 0 && argc > c)
! 		if (is_host (argv[c])) {
! 			db_host = argv[c++];
! 		}
! 		else {
! 			usage ("Invalid host name");
! 		}
  
! 	if (strlen(db_user) == 0 && argc > c)
! 		db_user = argv[c++];
! 
! 	if (strlen(db_pass) == 0 && argc > c)
! 		db_pass = argv[c++];
! 
! 	if (strlen(db) == 0 && argc > c)
! 		db = argv[c++];
! 
! 	if (is_intnonneg (argv[c]) && argc > c)
! 		db_port = atoi (argv[c++]);
  
  	return validate_arguments ();
--- 190,213 ----
  	c = optind;
  
! 	while ( argc > c ) {
  
! 		if (strlen(db_host) == 0)
! 			if (is_host (argv[c])) {
! 				db_host = argv[c++];
! 			}
! 			else {
! 				usage ("Invalid host name");
! 			}
! 		else if (strlen(db_user) == 0)
! 			db_user = argv[c++];
! 		else if (strlen(db_pass) == 0)
! 			db_pass = argv[c++];
! 		else if (strlen(db) == 0)
! 			db = argv[c++];
! 		else if (is_intnonneg (argv[c]))
! 			db_port = atoi (argv[c++]);
! 		else
! 			break;
! 	}
  
  	return validate_arguments ();





More information about the Commits mailing list