Mercurial > hg > nginx
changeset 3226:4872f86df719
fix r3225: it overrode the listen options by default server default options
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 22 Oct 2009 08:14:02 +0000 |
parents | f649453396f5 |
children | a610008bdc1a |
files | src/http/ngx_http.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http.c Wed Oct 21 19:18:50 2009 +0000 +++ b/src/http/ngx_http.c Thu Oct 22 08:14:02 2009 +0000 @@ -1209,10 +1209,15 @@ return NGX_ERROR; } - if (lsopt->set && addr[i].opt.set) { - ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + if (lsopt->set) { + + if (addr[i].opt.set) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "a duplicate listen options for %s", addr[i].opt.addr); - return NGX_ERROR; + return NGX_ERROR; + } + + addr[i].opt = *lsopt; } /* check the duplicate "default" server for this address:port */ @@ -1225,7 +1230,6 @@ return NGX_ERROR; } - addr[i].opt = *lsopt; addr[i].default_server = cscf; }