comparison src/core/ngx_cycle.c @ 384:12defd37f578 NGINX_0_7_4

nginx 0.7.4 *) Feature: variables support in the "access_log" directive. *) Feature: the "open_log_file_cache" directive. *) Feature: the -g switch. *) Feature: the "Expect" request header line support. *) Bugfix: large SSI inclusions might be truncated.
author Igor Sysoev <http://sysoev.ru>
date Mon, 30 Jun 2008 00:00:00 +0400
parents 984bb0b1399b
children a094317ba307
comparison
equal deleted inserted replaced
383:6ee3ada01457 384:12defd37f578
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 }