mturk 2005/07/07 08:20:54 Modified: jni/native/src sslnetwork.c Log: SSL clears the errno, so make sure the errno is remembered before the SSL_get_error call. Revision Changes Path 1.23 +8 -8 jakarta-tomcat-connectors/jni/native/src/sslnetwork.c Index: sslnetwork.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/sslnetwork.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- sslnetwork.c 7 Jul 2005 08:35:46 -0000 1.22 +++ sslnetwork.c 7 Jul 2005 15:20:54 -0000 1.23 @@ -345,6 +345,7 @@ for (;;) { if ((s = SSL_read(con->ssl, buf, rd)) <= 0) { + apr_status_t os = apr_get_netos_error(); int i = SSL_get_error(con->ssl, s); /* Special case if the "close notify" alert send by peer */ if (s == 0 && (con->ssl->shutdown & SSL_RECEIVED_SHUTDOWN)) { @@ -363,11 +364,10 @@ } break; case SSL_ERROR_SYSCALL: - s = apr_get_netos_error(); - if (!APR_STATUS_IS_EAGAIN(s) && - !APR_STATUS_IS_EINTR(s)) { + if (!APR_STATUS_IS_EAGAIN(os) && + !APR_STATUS_IS_EINTR(os)) { con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; - return s; + return os; } break; default: @@ -393,6 +393,7 @@ for (;;) { if ((s = SSL_write(con->ssl, buf, rd)) <= 0) { + apr_status_t os = apr_get_netos_error(); int i = SSL_get_error(con->ssl, s); switch (i) { case SSL_ERROR_ZERO_RETURN: @@ -406,9 +407,8 @@ } break; case SSL_ERROR_SYSCALL: - s = apr_get_netos_error(); - if (!APR_STATUS_IS_EAGAIN(s) && - !APR_STATUS_IS_EINTR(s)) { + if (!APR_STATUS_IS_EAGAIN(os) && + !APR_STATUS_IS_EINTR(os)) { con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD; return s; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]