[Nagiosplug-checkins] CVS: nagiosplug/plugins check_http.c,1.32,1.33

Karl DeBisschop kdebisschop at users.sourceforge.net
Thu May 8 20:23:04 CEST 2003


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

Modified Files:
	check_http.c 
Log Message:
fix error when server closes connection
immediately

Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** check_http.c	23 Apr 2003 04:58:38 -0000	1.32
--- check_http.c	9 May 2003 03:22:55 -0000	1.33
***************
*** 631,644 ****
  	}
  
! 	if (i < 0) {
  #ifdef HAVE_SSL
! 		sslerr=SSL_get_error(ssl, i);
! 		if ( sslerr == SSL_ERROR_SSL ) {
! 			terminate (STATE_WARNING, "Client Certificate Required\n");
! 		} else {
  			terminate (STATE_CRITICAL, "Error in recv()");
  		}
- #else
- 		terminate (STATE_CRITICAL, "Error in recv()");
  #endif
  	}
--- 631,649 ----
  	}
  
! 	if (i < 0 && errno != ECONNRESET) {
  #ifdef HAVE_SSL
! 		if (use_ssl) {
! 			sslerr=SSL_get_error(ssl, i);
! 			if ( sslerr == SSL_ERROR_SSL ) {
! 				terminate (STATE_WARNING, "Client Certificate Required\n");
! 			} else {
! 				terminate (STATE_CRITICAL, "Error in recv()");
! 			}
! 		}
! 		else {
! #endif
  			terminate (STATE_CRITICAL, "Error in recv()");
+ #ifdef HAVE_SSL
  		}
  #endif
  	}





More information about the Commits mailing list