aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_conf_file.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-09-03 15:50:30 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-09-03 15:50:30 +0000
commitb9e344175f4e971284aa14c8fe685936a4957d52 (patch)
tree3acb14a505668374140f25f711f9b95c9c787335 /src/core/ngx_conf_file.c
parent9e51181229fc00e3dfeb888c008fb02affc48246 (diff)
downloadnginx-b9e344175f4e971284aa14c8fe685936a4957d52.tar.gz
nginx-b9e344175f4e971284aa14c8fe685936a4957d52.zip
nginx-0.0.10-2004-09-03-19:50:30 import
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r--src/core/ngx_conf_file.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index 742809603..d546fe667 100644
--- 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 *cf, ngx_command_t *cmd, void *conf)
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_cycle_t *cycle, ngx_str_t *name)
}
}
- if (!(file = ngx_push_array(&cycle->open_files))) {
+ if (!(file = ngx_push_list(&cycle->open_files))) {
return NULL;
}