Mercurial > hg > nginx-quic
diff src/core/ngx_cycle.c @ 317:1308b98496a2
nginx-0.0.3-2004-04-15-19:34:36 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 15 Apr 2004 15:34:36 +0000 |
parents | a0beefedaf94 |
children | 56496082668b |
line wrap: on
line diff
--- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -23,7 +23,7 @@ ngx_cycle_t *ngx_init_cycle(ngx_cycle_t { void *rv; ngx_uint_t i, n, failed; - ngx_log_t *log, *new_log; + ngx_log_t *log; ngx_conf_t conf; ngx_pool_t *pool; ngx_cycle_t *cycle, **old; @@ -37,16 +37,14 @@ ngx_cycle_t *ngx_init_cycle(ngx_cycle_t if (!(pool = ngx_create_pool(16 * 1024, log))) { return NULL; } + pool->log = log; if (!(cycle = ngx_pcalloc(pool, sizeof(ngx_cycle_t)))) { ngx_destroy_pool(pool); return NULL; } cycle->pool = pool; - - pool->log = log; cycle->log = log; - cycle->old_cycle = old_cycle; cycle->conf_file = old_cycle->conf_file; @@ -74,7 +72,7 @@ ngx_cycle_t *ngx_init_cycle(ngx_cycle_t cycle->open_files.pool = pool; - if (!(new_log = ngx_log_create_errlog(cycle, NULL))) { + if (!(cycle->new_log = ngx_log_create_errlog(cycle, NULL))) { ngx_destroy_pool(pool); return NULL; } @@ -127,19 +125,17 @@ ngx_cycle_t *ngx_init_cycle(ngx_cycle_t conf.ctx = cycle->conf_ctx; conf.cycle = cycle; - /* STUB */ conf.pool = cycle->pool; + conf.pool = pool; conf.log = log; conf.module_type = NGX_CORE_MODULE; conf.cmd_type = NGX_MAIN_CONF; - cycle->log = new_log; if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { ngx_destroy_pool(pool); return NULL; } - cycle->log = log; for (i = 0; ngx_modules[i]; i++) { if (ngx_modules[i]->type != NGX_CORE_MODULE) { @@ -208,8 +204,8 @@ ngx_cycle_t *ngx_init_cycle(ngx_cycle_t } } - cycle->log = new_log; - pool->log = new_log; + cycle->log = cycle->new_log; + pool->log = cycle->new_log; if (!failed) { if (old_cycle->listening.nelts) {