Mercurial > hg > nginx-ranges
diff src/event/ngx_event_openssl.c @ 10:46833bd150cb NGINX_0_1_5
nginx 0.1.5
*) Bugfix: on Solaris and Linux there may be too many "recvmsg()
returned not enough data" alerts.
*) Bugfix: there were the "writev() failed (22: Invalid argument)"
errors on Solaris in proxy mode without sendfile. On other platforms
that do not support sendfile at all the process got caught in an
endless loop.
*) Bugfix: segmentation fault on Solaris in proxy mode and using
sendfile.
*) Bugfix: segmentation fault on Solaris.
*) Bugfix: on-line upgrade did not work on Linux.
*) Bugfix: the ngx_http_autoindex_module module did not escape the
spaces, the quotes, and the percent signs in the directory listing.
*) Change: the decrease of the copy operations.
*) Feature: the userid_p3p directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 11 Nov 2004 00:00:00 +0300 |
parents | 4b2dafa26fe2 |
children | 6f8b0dc0f8dd |
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -73,7 +73,7 @@ ngx_int_t ngx_ssl_recv(ngx_connection_t } if (!SSL_is_init_finished(c->ssl->ssl)) { - handshake = "in SSL handshake"; + handshake = " in SSL handshake"; } else { handshake = ""; @@ -269,7 +269,7 @@ static ngx_int_t ngx_ssl_write(ngx_conne if (sslerr == SSL_ERROR_WANT_READ) { if (!SSL_is_init_finished(c->ssl->ssl)) { - handshake = "in SSL handshake"; + handshake = " in SSL handshake"; } else { handshake = ""; @@ -310,6 +310,9 @@ ngx_int_t ngx_ssl_shutdown(ngx_connectio } again = 0; +#if (NGX_SUPPRESS_WARN) + sslerr = 0; +#endif for ( ;; ) { n = SSL_shutdown(c->ssl->ssl); @@ -366,23 +369,18 @@ ngx_int_t ngx_ssl_shutdown(ngx_connectio void ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...) { - int len; - char errstr[NGX_MAX_CONF_ERRSTR]; - va_list args; + u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last; + va_list args; + + last = errstr + NGX_MAX_CONF_ERRSTR; va_start(args, fmt); - len = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args); + p = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args); va_end(args); - errstr[len++] = ' '; - errstr[len++] = '('; - errstr[len++] = 'S'; - errstr[len++] = 'S'; - errstr[len++] = 'L'; - errstr[len++] = ':'; - errstr[len++] = ' '; + p = ngx_cpystrn(p, " (SSL: ", last - p); - ERR_error_string_n(ERR_get_error(), errstr + len, sizeof(errstr) - len - 1); + ERR_error_string_n(ERR_get_error(), (char *) p, last - p); ngx_log_error(level, log, err, "%s)", errstr); }