comparison src/core/ngx_file.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 ad45b044f1e5
children 88a1b4797f2e
comparison
equal deleted inserted replaced
687:a7305f494f1c 688:f31b19fe7f48
410 ngx_uint_t i, n; 410 ngx_uint_t i, n;
411 ngx_path_t *path, **p; 411 ngx_path_t *path, **p;
412 412
413 path = *slot; 413 path = *slot;
414 414
415 p = cf->cycle->pathes.elts; 415 p = cf->cycle->paths.elts;
416 for (i = 0; i < cf->cycle->pathes.nelts; i++) { 416 for (i = 0; i < cf->cycle->paths.nelts; i++) {
417 if (p[i]->name.len == path->name.len 417 if (p[i]->name.len == path->name.len
418 && ngx_strcmp(p[i]->name.data, path->name.data) == 0) 418 && ngx_strcmp(p[i]->name.data, path->name.data) == 0)
419 { 419 {
420 for (n = 0; n < 3; n++) { 420 for (n = 0; n < 3; n++) {
421 if (p[i]->level[n] != path->level[n]) { 421 if (p[i]->level[n] != path->level[n]) {
455 455
456 return NGX_OK; 456 return NGX_OK;
457 } 457 }
458 } 458 }
459 459
460 p = ngx_array_push(&cf->cycle->pathes); 460 p = ngx_array_push(&cf->cycle->paths);
461 if (p == NULL) { 461 if (p == NULL) {
462 return NGX_ERROR; 462 return NGX_ERROR;
463 } 463 }
464 464
465 *p = path; 465 *p = path;
467 return NGX_OK; 467 return NGX_OK;
468 } 468 }
469 469
470 470
471 ngx_int_t 471 ngx_int_t
472 ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user) 472 ngx_create_paths(ngx_cycle_t *cycle, ngx_uid_t user)
473 { 473 {
474 ngx_err_t err; 474 ngx_err_t err;
475 ngx_uint_t i; 475 ngx_uint_t i;
476 ngx_path_t **path; 476 ngx_path_t **path;
477 477
478 path = cycle->pathes.elts; 478 path = cycle->paths.elts;
479 for (i = 0; i < cycle->pathes.nelts; i++) { 479 for (i = 0; i < cycle->paths.nelts; i++) {
480 480
481 if (ngx_create_dir(path[i]->name.data, 0700) == NGX_FILE_ERROR) { 481 if (ngx_create_dir(path[i]->name.data, 0700) == NGX_FILE_ERROR) {
482 err = ngx_errno; 482 err = ngx_errno;
483 if (err != NGX_EEXIST) { 483 if (err != NGX_EEXIST) {
484 ngx_log_error(NGX_LOG_EMERG, cycle->log, err, 484 ngx_log_error(NGX_LOG_EMERG, cycle->log, err,