Mercurial > hg > nginx-ranges
diff src/os/unix/ngx_files.c @ 412:79c5df00501e NGINX_0_7_15
nginx 0.7.15
*) Feature: the ngx_http_random_index_module.
*) Feature: the "directio" directive has been optimized for file
requests starting from arbitrary position.
*) Feature: the "directio" directive turns off sendfile if it is
necessary.
*) Feature: now nginx allows underscores in a client request header
line names.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 08 Sep 2008 00:00:00 +0400 |
parents | df7b79c859c3 |
children | a8e3f1441eec |
line wrap: on
line diff
--- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c @@ -249,12 +249,33 @@ ngx_open_dir(ngx_str_t *name, ngx_dir_t } dir->valid_info = 0; +#if (NGX_HAVE_D_TYPE) + dir->valid_type = 1; +#else + dir->valid_type = 0; +#endif return NGX_OK; } ngx_int_t +ngx_read_dir(ngx_dir_t *dir) +{ + dir->de = readdir(dir->dir); + + if (dir->de) { +#if (NGX_HAVE_D_TYPE) + dir->type = dir->de->d_type; +#endif + return NGX_OK; + } + + return NGX_ERROR; +} + + +ngx_int_t ngx_open_glob(ngx_glob_t *gl) { int n;