From 07eb7bec1f2c2d440fc87d89c09681e5b6939f94 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 1 Nov 2011 13:56:26 +0000 Subject: Merging r4155, r4219, r4220, r4230: Windows related fixes: *) Fixed segmentation fault with empty config on Windows. See here for report: http://mailman.nginx.org/pipermail/nginx-ru/2011-September/043288.html *) Recent SDKs allow to build IPV6 only for Windows XP or above. *) Fixing conflict with SDK off_t definition. *) Fix of building by Microsoft Visual C++ 10 compiler. --- src/http/ngx_http.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/http') 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; } } -- cgit