diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2011-09-27 16:07:09 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2011-09-27 16:07:09 +0400 |
commit | 5cc90f309dad4d02a83e929b3a46e6ad895d75dc (patch) | |
tree | 340ce134c6bdd33578f4830b6a13f8ec6ce1637d /src/http/ngx_http.c | |
parent | 554768dabbe9a9b5cc26c51c66fb20e92f4203af (diff) |
Fixed segmentation fault with empty config on Windows.
See here for report:
http://mailman.nginx.org/pipermail/nginx-ru/2011-September/043288.html
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r-- | src/http/ngx_http.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 4f0b79def..1eb22f81e 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1747,10 +1747,12 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr) #if (NGX_WIN32) { - ngx_iocp_conf_t *iocpcf; + ngx_iocp_conf_t *iocpcf = NULL; - iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module); - if (iocpcf->acceptex_read) { + if (ngx_get_conf(cf->cycle->conf_ctx, ngx_events_module)) { + iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module); + } + if (iocpcf && iocpcf->acceptex_read) { ls->post_accept_buffer_size = cscf->client_header_buffer_size; } } |