Browse Source

check errno on SSL_ERROR_SYSCALL

git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@83 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/release-1.3.13
Jan Kneschke 17 years ago
parent
commit
1956311750
  1. 12
      src/network_openssl.c

12
src/network_openssl.c

@ -61,6 +61,12 @@ int network_write_chunkqueue_openssl(server *srv, connection *con, chunkqueue *c
switch ((ssl_r = SSL_get_error(con->ssl, r))) {
case SSL_ERROR_WANT_WRITE:
break;
case SSL_ERROR_SYSCALL:
log_error_write(srv, __FILE__, __LINE__, "sddds", "SSL:",
ssl_r, r, errno,
strerror(errno));
return -1;
case SSL_ERROR_ZERO_RETURN:
/* clean shutdown on the remote side */
@ -129,6 +135,12 @@ int network_write_chunkqueue_openssl(server *srv, connection *con, chunkqueue *c
switch ((ssl_r = SSL_get_error(con->ssl, r))) {
case SSL_ERROR_WANT_WRITE:
break;
case SSL_ERROR_SYSCALL:
log_error_write(srv, __FILE__, __LINE__, "sddds", "SSL:",
ssl_r, r, errno,
strerror(errno));
return -1;
case SSL_ERROR_ZERO_RETURN:
/* clean shutdown on the remote side */

Loading…
Cancel
Save