[Nagios-checkins] ndoutils/src ndo2db.c,1.21,1.22

Duncan Ferguson duncan_ferguson at users.sourceforge.net
Thu Aug 6 14:39:38 UTC 2009


Update of /cvsroot/nagios/ndoutils/src
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27218/src

Modified Files:
	ndo2db.c 
Log Message:
Fix for not retrying read on 'EAGAIN' and 'EINTR' soft errors (Opsera Ltd)


Index: ndo2db.c
===================================================================
RCS file: /cvsroot/nagios/ndoutils/src/ndo2db.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** ndo2db.c	6 Aug 2009 14:32:39 -0000	1.21
--- ndo2db.c	6 Aug 2009 14:39:36 -0000	1.22
***************
*** 909,915 ****
  
  		/* bail out on hard errors */
! 		if(result==-1 && (errno!=EAGAIN && errno!=EINTR)){
! 			error=NDO_TRUE;
! 			break;
  		        }
  
--- 909,920 ----
  
  		/* bail out on hard errors */
! 		if(result==-1) {
! 			/* EAGAIN and EINTR are soft errors, so try another read() */
! 			if (errno==EAGAIN || errno==EINTR)
! 				continue;
! 			else {
! 				error=NDO_TRUE;
! 				break;
! 				}
  		        }
  





More information about the Nagios-commits mailing list