Mercurial > hg > nginx
diff src/core/ngx_cycle.c @ 2073:01b71aa095cc
-g switch
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 30 Jun 2008 12:35:16 +0000 |
parents | 2a92804f4109 |
children | bf38420c9e25 |
line wrap: on
line diff
--- a/src/core/ngx_cycle.c Mon Jun 30 12:27:24 2008 +0000 +++ b/src/core/ngx_cycle.c Mon Jun 30 12:35:16 2008 +0000 @@ -90,6 +90,16 @@ 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 @@ 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;