diff options
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r-- | src/core/ngx_cycle.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index a82e8506b..725f54b49 100644 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -90,6 +90,16 @@ ngx_init_cycle(ngx_cycle_t *old_cycle) old_cycle->conf_file.len + 1); + cycle->conf_param.len = old_cycle->conf_param.len; + cycle->conf_param.data = ngx_pnalloc(pool, old_cycle->conf_param.len); + if (cycle->conf_param.data == NULL) { + ngx_destroy_pool(pool); + return NULL; + } + ngx_memcpy(cycle->conf_param.data, old_cycle->conf_param.data, + old_cycle->conf_param.len); + + n = old_cycle->pathes.nelts ? old_cycle->pathes.nelts : 10; cycle->pathes.elts = ngx_pcalloc(pool, n * sizeof(ngx_path_t *)); @@ -238,6 +248,11 @@ ngx_init_cycle(ngx_cycle_t *old_cycle) log->log_level = NGX_LOG_DEBUG_ALL; #endif + if (ngx_conf_param(&conf) != NGX_CONF_OK) { + ngx_destroy_cycle_pools(&conf); + return NULL; + } + if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { ngx_destroy_cycle_pools(&conf); return NULL; |