Mercurial > hg > nginx-vendor-current
diff src/core/ngx_connection.c @ 574:7858d4f8dec4 NGINX_0_8_39
nginx 0.8.39
*) Bugfix: an inherited "alias" directive worked incorrectly in
inclusive location.
*) Bugfix: in "alias" with variables and "try_files" directives
combination.
*) Bugfix: listen unix domain and IPv6 sockets did not inherit while
online upgrade.
Thanks to Maxim Dounin.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 31 May 2010 00:00:00 +0400 |
parents | 5c576ea5dbd9 |
children | 016632f0fb18 |
line wrap: on
line diff
--- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -96,14 +96,12 @@ ngx_set_inherited_sockets(ngx_cycle_t *c ls = cycle->listening.elts; for (i = 0; i < cycle->listening.nelts; i++) { - /* AF_INET only */ - - ls[i].sockaddr = ngx_palloc(cycle->pool, sizeof(struct sockaddr_in)); + ls[i].sockaddr = ngx_palloc(cycle->pool, NGX_SOCKADDRLEN); if (ls[i].sockaddr == NULL) { return NGX_ERROR; } - ls[i].socklen = sizeof(struct sockaddr_in); + ls[i].socklen = NGX_SOCKADDRLEN; if (getsockname(ls[i].fd, ls[i].sockaddr, &ls[i].socklen) == -1) { ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_socket_errno, "getsockname() of the inherited "