Mercurial > hg > nginx-vendor-0-7
comparison src/core/ngx_cycle.c @ 142:84910468f6de NGINX_0_3_18
nginx 0.3.18
*) Feature: the "server_names" directive supports the ".domain.tld"
names.
*) Feature: the "server_names" directive uses the hash for the
"*.domain.tld" names and more effective hash for usual names.
*) Change: the "server_names_hash_max_size" and
"server_names_hash_bucket_size" directives.
*) Change: the "server_names_hash" and "server_names_hash_threshold"
directives were canceled.
*) Feature: the "valid_referers" directive uses the hash site names.
*) Change: now the "valid_referers" directive checks the site names
only without the URI part.
*) Bugfix: some ".domain.tld" names incorrectly processed by the
ngx_http_map_module.
*) Bugfix: segmentation fault was occurred if configuration file did
not exist; bug appeared in 0.3.12.
*) Bugfix: on 64-bit platforms segmentation fault may occurred on
start; bug appeared in 0.3.16.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 26 Dec 2005 00:00:00 +0300 |
parents | df17fbafec8f |
children | bb61aa162c6b |
comparison
equal
deleted
inserted
replaced
141:249e67502bf3 | 142:84910468f6de |
---|---|
160 if (conf.args == NULL) { | 160 if (conf.args == NULL) { |
161 ngx_destroy_pool(pool); | 161 ngx_destroy_pool(pool); |
162 return NULL; | 162 return NULL; |
163 } | 163 } |
164 | 164 |
165 conf.temp_pool = ngx_create_pool(NGX_CYCLE_POOL_SIZE, log); | |
166 if (conf.temp_pool == NULL) { | |
167 ngx_destroy_pool(pool); | |
168 return NULL; | |
169 } | |
170 | |
165 conf.ctx = cycle->conf_ctx; | 171 conf.ctx = cycle->conf_ctx; |
166 conf.cycle = cycle; | 172 conf.cycle = cycle; |
167 conf.pool = pool; | 173 conf.pool = pool; |
168 conf.log = log; | 174 conf.log = log; |
169 conf.module_type = NGX_CORE_MODULE; | 175 conf.module_type = NGX_CORE_MODULE; |
172 #if 0 | 178 #if 0 |
173 log->log_level = NGX_LOG_DEBUG_ALL; | 179 log->log_level = NGX_LOG_DEBUG_ALL; |
174 #endif | 180 #endif |
175 | 181 |
176 if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { | 182 if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { |
183 ngx_destroy_pool(conf.temp_pool); | |
177 ngx_destroy_pool(pool); | 184 ngx_destroy_pool(pool); |
178 return NULL; | 185 return NULL; |
179 } | 186 } |
180 | 187 |
181 if (ngx_test_config) { | 188 if (ngx_test_config) { |
192 | 199 |
193 module = ngx_modules[i]->ctx; | 200 module = ngx_modules[i]->ctx; |
194 | 201 |
195 if (module->init_conf) { | 202 if (module->init_conf) { |
196 if (module->init_conf(cycle, cycle->conf_ctx[ngx_modules[i]->index]) | 203 if (module->init_conf(cycle, cycle->conf_ctx[ngx_modules[i]->index]) |
197 == NGX_CONF_ERROR) | 204 == NGX_CONF_ERROR) |
198 { | 205 { |
206 ngx_destroy_pool(conf.temp_pool); | |
199 ngx_destroy_pool(pool); | 207 ngx_destroy_pool(pool); |
200 return NULL; | 208 return NULL; |
201 } | 209 } |
202 } | 210 } |
203 } | 211 } |
419 file[i].name.data); | 427 file[i].name.data); |
420 } | 428 } |
421 } | 429 } |
422 | 430 |
423 if (ngx_test_config) { | 431 if (ngx_test_config) { |
432 ngx_destroy_pool(conf.temp_pool); | |
424 ngx_destroy_pool(pool); | 433 ngx_destroy_pool(pool); |
425 return NULL; | 434 return NULL; |
426 } | 435 } |
427 | 436 |
428 ls = cycle->listening.elts; | 437 ls = cycle->listening.elts; |
436 ngx_close_socket_n " %V failed", | 445 ngx_close_socket_n " %V failed", |
437 &ls[i].addr_text); | 446 &ls[i].addr_text); |
438 } | 447 } |
439 } | 448 } |
440 | 449 |
450 ngx_destroy_pool(conf.temp_pool); | |
441 ngx_destroy_pool(pool); | 451 ngx_destroy_pool(pool); |
442 return NULL; | 452 return NULL; |
443 } | 453 } |
444 | 454 |
445 | 455 |
518 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, | 528 ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, |
519 ngx_close_file_n " \"%s\" failed", | 529 ngx_close_file_n " \"%s\" failed", |
520 file[i].name.data); | 530 file[i].name.data); |
521 } | 531 } |
522 } | 532 } |
533 | |
534 ngx_destroy_pool(conf.temp_pool); | |
523 | 535 |
524 if (old_cycle->connections == NULL) { | 536 if (old_cycle->connections == NULL) { |
525 /* an old cycle is an init cycle */ | 537 /* an old cycle is an init cycle */ |
526 ngx_destroy_pool(old_cycle->pool); | 538 ngx_destroy_pool(old_cycle->pool); |
527 return cycle; | 539 return cycle; |