diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-11-18 21:34:08 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-11-18 21:34:08 +0000 |
commit | 1b138ed141c0bdb0c9944c1ae70e53682ed2d035 (patch) | |
tree | c5b4cabecced530570f4a2d6a93cc7d5fc8e044e /src/core/ngx_file.c | |
parent | 222a2adf40eb25ff613c251f15032f1e39d7f609 (diff) | |
download | nginx-1b138ed141c0bdb0c9944c1ae70e53682ed2d035.tar.gz nginx-1b138ed141c0bdb0c9944c1ae70e53682ed2d035.zip |
nginx-0.0.1-2003-11-19-00:34:08 import
Diffstat (limited to 'src/core/ngx_file.c')
-rw-r--r-- | src/core/ngx_file.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c index f5a1c6601..ee4c653db 100644 --- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c @@ -202,8 +202,14 @@ char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return "is duplicate"; } - ngx_test_null(path, ngx_pcalloc(cf->pool, sizeof(ngx_path_t)), NULL); + /* TODO: check duplicate in cf->cycle->pathes */ + ngx_test_null(path, ngx_pcalloc(cf->pool, sizeof(ngx_path_t)), + NGX_CONF_ERROR); + + *pp = path; + + ngx_test_null(pp, ngx_push_array(&cf->cycle->pathes), NGX_CONF_ERROR); *pp = path; value = (ngx_str_t *) cf->args->elts; @@ -225,5 +231,7 @@ char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) path->level[i++] = 0; } + path->gc_handler = cmd->post; + return NGX_CONF_OK; } |