diff options
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r-- | src/core/nginx.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c index 7f13a7469..4a22e581f 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -4,6 +4,7 @@ #include <ngx_config.h> #include <ngx_core.h> +#include <ngx_os_init.h> #include <ngx_string.h> #include <ngx_errno.h> #include <ngx_time.h> @@ -52,6 +53,10 @@ int main(int argc, char *const *argv) /* STUB */ ngx_log.log_level = NGX_LOG_DEBUG; + if (ngx_os_init(&ngx_log) == NGX_ERROR) { + exit(1); + } + ngx_pool = ngx_create_pool(16 * 1024, &ngx_log); /* */ @@ -67,12 +72,6 @@ int main(int argc, char *const *argv) #endif -#if 0 - if (ngx_os_init(&ngx_log) == NGX_ERROR) { - exit(1); - } -#endif - ngx_init_array(ngx_listening_sockets, ngx_pool, 10, sizeof(ngx_listen_t), 1); @@ -86,7 +85,8 @@ int main(int argc, char *const *argv) ngx_create_array(ngx_pool, 10, sizeof(ngx_str_t)), 1); conf.pool = ngx_pool; conf.log = &ngx_log; - conf.type = NGX_CORE_MODULE_TYPE; + conf.module_type = NGX_CORE_MODULE_TYPE; + conf.cmd_type = NGX_MAIN_CONF; conf_file.len = sizeof("nginx.conf") - 1; conf_file.data = "nginx.conf"; |