Mercurial > hg > nginx
changeset 3537:d2848db4d98e
fix IPv6 and Unix domain sockets inheritance while online upgrade
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 31 May 2010 14:49:11 +0000 |
parents | 72c3edbd4dc8 |
children | af10bf9d4c65 |
files | src/core/ngx_connection.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_connection.c Mon May 31 14:44:17 2010 +0000 +++ b/src/core/ngx_connection.c Mon May 31 14:49:11 2010 +0000 @@ -96,14 +96,12 @@ 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 "