Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
2072:ee2fecdfdef7 | 2073:01b71aa095cc |
---|---|
88 } | 88 } |
89 ngx_cpystrn(cycle->conf_file.data, old_cycle->conf_file.data, | 89 ngx_cpystrn(cycle->conf_file.data, old_cycle->conf_file.data, |
90 old_cycle->conf_file.len + 1); | 90 old_cycle->conf_file.len + 1); |
91 | 91 |
92 | 92 |
93 cycle->conf_param.len = old_cycle->conf_param.len; | |
94 cycle->conf_param.data = ngx_pnalloc(pool, old_cycle->conf_param.len); | |
95 if (cycle->conf_param.data == NULL) { | |
96 ngx_destroy_pool(pool); | |
97 return NULL; | |
98 } | |
99 ngx_memcpy(cycle->conf_param.data, old_cycle->conf_param.data, | |
100 old_cycle->conf_param.len); | |
101 | |
102 | |
93 n = old_cycle->pathes.nelts ? old_cycle->pathes.nelts : 10; | 103 n = old_cycle->pathes.nelts ? old_cycle->pathes.nelts : 10; |
94 | 104 |
95 cycle->pathes.elts = ngx_pcalloc(pool, n * sizeof(ngx_path_t *)); | 105 cycle->pathes.elts = ngx_pcalloc(pool, n * sizeof(ngx_path_t *)); |
96 if (cycle->pathes.elts == NULL) { | 106 if (cycle->pathes.elts == NULL) { |
97 ngx_destroy_pool(pool); | 107 ngx_destroy_pool(pool); |
235 conf.cmd_type = NGX_MAIN_CONF; | 245 conf.cmd_type = NGX_MAIN_CONF; |
236 | 246 |
237 #if 0 | 247 #if 0 |
238 log->log_level = NGX_LOG_DEBUG_ALL; | 248 log->log_level = NGX_LOG_DEBUG_ALL; |
239 #endif | 249 #endif |
250 | |
251 if (ngx_conf_param(&conf) != NGX_CONF_OK) { | |
252 ngx_destroy_cycle_pools(&conf); | |
253 return NULL; | |
254 } | |
240 | 255 |
241 if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { | 256 if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { |
242 ngx_destroy_cycle_pools(&conf); | 257 ngx_destroy_cycle_pools(&conf); |
243 return NULL; | 258 return NULL; |
244 } | 259 } |