comparison src/core/ngx_cycle.c @ 688:f31b19fe7f48 NGINX_1_3_7

nginx 1.3.7 *) Feature: OCSP stapling support. Thanks to Comodo, DigiCert and GlobalSign for sponsoring this work. *) Feature: the "ssl_trusted_certificate" directive. *) Feature: resolver now randomly rotates addresses returned from cache. Thanks to Anton Jouline. *) Bugfix: OpenSSL 0.9.7 compatibility.
author Igor Sysoev <http://sysoev.ru>
date Tue, 02 Oct 2012 00:00:00 +0400
parents 660139fd80ca
children 6db6e93f55ee
comparison
equal deleted inserted replaced
687:a7305f494f1c 688:f31b19fe7f48
116 ngx_destroy_pool(pool); 116 ngx_destroy_pool(pool);
117 return NULL; 117 return NULL;
118 } 118 }
119 119
120 120
121 n = old_cycle->pathes.nelts ? old_cycle->pathes.nelts : 10; 121 n = old_cycle->paths.nelts ? old_cycle->paths.nelts : 10;
122 122
123 cycle->pathes.elts = ngx_pcalloc(pool, n * sizeof(ngx_path_t *)); 123 cycle->paths.elts = ngx_pcalloc(pool, n * sizeof(ngx_path_t *));
124 if (cycle->pathes.elts == NULL) { 124 if (cycle->paths.elts == NULL) {
125 ngx_destroy_pool(pool); 125 ngx_destroy_pool(pool);
126 return NULL; 126 return NULL;
127 } 127 }
128 128
129 cycle->pathes.nelts = 0; 129 cycle->paths.nelts = 0;
130 cycle->pathes.size = sizeof(ngx_path_t *); 130 cycle->paths.size = sizeof(ngx_path_t *);
131 cycle->pathes.nalloc = n; 131 cycle->paths.nalloc = n;
132 cycle->pathes.pool = pool; 132 cycle->paths.pool = pool;
133 133
134 134
135 if (old_cycle->open_files.part.nelts) { 135 if (old_cycle->open_files.part.nelts) {
136 n = old_cycle->open_files.part.nelts; 136 n = old_cycle->open_files.part.nelts;
137 for (part = old_cycle->open_files.part.next; part; part = part->next) { 137 for (part = old_cycle->open_files.part.next; part; part = part->next) {
332 if (ngx_test_lockfile(cycle->lock_file.data, log) != NGX_OK) { 332 if (ngx_test_lockfile(cycle->lock_file.data, log) != NGX_OK) {
333 goto failed; 333 goto failed;
334 } 334 }
335 335
336 336
337 if (ngx_create_pathes(cycle, ccf->user) != NGX_OK) { 337 if (ngx_create_paths(cycle, ccf->user) != NGX_OK) {
338 goto failed; 338 goto failed;
339 } 339 }
340 340
341 341
342 if (cycle->new_log.file == NULL) { 342 if (cycle->new_log.file == NULL) {
1036 1036
1037 ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "signal process started"); 1037 ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "signal process started");
1038 1038
1039 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); 1039 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
1040 1040
1041 ngx_memzero(&file, sizeof(ngx_file_t));
1042
1041 file.name = ccf->pid; 1043 file.name = ccf->pid;
1042 file.log = cycle->log; 1044 file.log = cycle->log;
1043 1045
1044 file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY, 1046 file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY,
1045 NGX_FILE_OPEN, NGX_FILE_DEFAULT_ACCESS); 1047 NGX_FILE_OPEN, NGX_FILE_DEFAULT_ACCESS);