pull all errors

This commit is contained in:
Igor Sysoev 2008-01-10 08:45:00 +00:00
parent e965c47113
commit 8b99e3f1ea

View File

@ -1159,9 +1159,10 @@ ngx_ssl_clear_error(ngx_log_t *log)
void ngx_cdecl
ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...)
{
u_long n;
va_list args;
u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last;
u_long n;
va_list args;
u_char *p, *last;
u_char errstr[NGX_MAX_CONF_ERRSTR];
last = errstr + NGX_MAX_CONF_ERRSTR;
@ -1171,7 +1172,7 @@ ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...)
p = ngx_cpystrn(p, (u_char *) " (SSL:", last - p);
while (p < last) {
for ( ;; ) {
n = ERR_get_error();
@ -1179,6 +1180,10 @@ ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...)
break;
}
if (p >= last) {
continue;
}
*p++ = ' ';
ERR_error_string_n(n, (char *) p, last - p);