diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-04-15 15:34:36 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-04-15 15:34:36 +0000 |
| commit | 68df19d33ac5cf804650261867afd5f8acdce364 (patch) | |
| tree | 5a49e42b41da04ea73eec12d0f402730e3268ca1 /src/core/ngx_cycle.c | |
| parent | cccc5528945be46d6afb456e7aba751340af9089 (diff) | |
| download | nginx-68df19d33ac5cf804650261867afd5f8acdce364.tar.gz nginx-68df19d33ac5cf804650261867afd5f8acdce364.tar.bz2 | |
nginx-0.0.3-2004-04-15-19:34:36 import
Diffstat (limited to 'src/core/ngx_cycle.c')
| -rw-r--r-- | src/core/ngx_cycle.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index 077b12092..71a0b0080 100644 --- 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 *old_cycle) { 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 *old_cycle) 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 *old_cycle) 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 *old_cycle) 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 *old_cycle) } } - 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) { |
