[Nagiosplug-checkins] CVS: nagiosplug/plugins check_dns.c,1.7,1.8

Ton Voon tonvoon at users.sourceforge.net
Fri Feb 21 13:47:11 CET 2003


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

Modified Files:
	check_dns.c 
Log Message:
Strip leading spaces on dns return value (689563 - Simon L Nielsen)


Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** check_dns.c	5 Feb 2003 05:58:35 -0000	1.7
--- check_dns.c	21 Feb 2003 21:46:27 -0000	1.8
***************
*** 133,137 ****
  
  			if ((temp_buffer = index (input_buffer, ':'))) {
! 				address = strscpy (address, temp_buffer + 2);
  				strip (address);
  				result = STATE_OK;
--- 133,141 ----
  
  			if ((temp_buffer = index (input_buffer, ':'))) {
! 				temp_buffer++;
! 				/* Strip leading spaces */
! 				for (; *temp_buffer != '\0' && *temp_buffer == ' '; temp_buffer++)
! 					/* NOOP */;
! 				address = strscpy (address, temp_buffer);
  				strip (address);
  				result = STATE_OK;





More information about the Commits mailing list