Mercurial > hg > nginx
diff src/core/ngx_conf_file.c @ 414:388a842cbbe1
nginx-0.0.10-2004-09-03-19:50:30 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 03 Sep 2004 15:50:30 +0000 |
parents | 199cd29f35a3 |
children | 3c56e834be46 |
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c @@ -572,11 +572,28 @@ static char *ngx_conf_include(ngx_conf_t ngx_open_file_t *ngx_conf_open_file(ngx_cycle_t *cycle, ngx_str_t *name) { ngx_uint_t i; + ngx_list_part_t *part; ngx_open_file_t *file; if (name) { + part = &cycle->open_files.part; + file = part->elts; + + for (i = 0; /* void */ ; i++) { + + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + part = part->next; + file = part->elts; + i = 0; + } + +#if 0 file = cycle->open_files.elts; for (i = 0; i < cycle->open_files.nelts; i++) { +#endif if (name->len != file[i].name.len) { continue; } @@ -587,7 +604,7 @@ ngx_open_file_t *ngx_conf_open_file(ngx_ } } - if (!(file = ngx_push_array(&cycle->open_files))) { + if (!(file = ngx_push_list(&cycle->open_files))) { return NULL; }