[Nagiosplug-checkins] CVS: nagiosplug/plugins check_udp.c,1.3,1.4

Karl DeBisschop kdebisschop at users.sourceforge.net
Tue Feb 18 14:26:11 CET 2003


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

Modified Files:
	check_udp.c 
Log Message:
never exited getopt loop

Index: check_udp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_udp.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** check_udp.c	13 Jan 2003 12:15:16 -0000	1.3
--- check_udp.c	18 Feb 2003 22:24:35 -0000	1.4
***************
*** 162,165 ****
--- 162,168 ----
  #endif
  
+ 		if (c == -1 || c == EOF || c == 1)
+ 			break;
+ 
  		switch (c) {
  		case '?':									/* print short usage statement if args not parsable */
***************
*** 213,217 ****
  
  	c = optind;
! 	if (server_address == NULL && argv[c]) {
  		if (is_host (argv[c]) == FALSE)
  			usage ("Invalid host name/address\n");
--- 216,220 ----
  
  	c = optind;
! 	if (server_address == NULL && c < argc && argv[c]) {
  		if (is_host (argv[c]) == FALSE)
  			usage ("Invalid host name/address\n");





More information about the Commits mailing list