diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-10-22 12:14:02 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-10-22 12:14:02 +0400 |
commit | acb43232f6944946f7441e4f4f3d9c10ad7f90d5 (patch) | |
tree | a147698880af87101adddfd1543e34df2159aeb7 /src/http/ngx_http.c | |
parent | 9826961ed4d8438848ef6f0191a01574cf4daef4 (diff) |
fix r3225: it overrode the listen options by default server default options
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r-- | src/http/ngx_http.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 44166a4c1..e5387c4c3 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1209,10 +1209,15 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, 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 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, return NGX_ERROR; } - addr[i].opt = *lsopt; addr[i].default_server = cscf; } |