Mercurial > hg > nginx
comparison src/core/ngx_open_file_cache.c @ 2782:4bd7825fab80
uniform ngx_file_info() interface with ngx_fd_info()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 29 Apr 2009 19:28:52 +0000 |
parents | 09cab3f8d92e |
children | 87c088e6956a |
comparison
equal
deleted
inserted
replaced
2781:f545c81e5ddb | 2782:4bd7825fab80 |
---|---|
141 | 141 |
142 if (cache == NULL) { | 142 if (cache == NULL) { |
143 | 143 |
144 if (of->test_only) { | 144 if (of->test_only) { |
145 | 145 |
146 if (ngx_file_info(name->data, &fi) == -1) { | 146 if (ngx_file_info(name->data, &fi) == NGX_FILE_ERROR) { |
147 of->err = ngx_errno; | 147 of->err = ngx_errno; |
148 of->failed = ngx_file_info_n; | 148 of->failed = ngx_file_info_n; |
149 return NGX_ERROR; | 149 return NGX_ERROR; |
150 } | 150 } |
151 | 151 |
461 ngx_fd_t fd; | 461 ngx_fd_t fd; |
462 ngx_file_info_t fi; | 462 ngx_file_info_t fi; |
463 | 463 |
464 if (of->fd != NGX_INVALID_FILE) { | 464 if (of->fd != NGX_INVALID_FILE) { |
465 | 465 |
466 if (ngx_file_info(name, &fi) == -1) { | 466 if (ngx_file_info(name, &fi) == NGX_FILE_ERROR) { |
467 of->failed = ngx_file_info_n; | 467 of->failed = ngx_file_info_n; |
468 goto failed; | 468 goto failed; |
469 } | 469 } |
470 | 470 |
471 if (of->uniq == ngx_file_uniq(&fi)) { | 471 if (of->uniq == ngx_file_uniq(&fi)) { |
472 goto done; | 472 goto done; |
473 } | 473 } |
474 | 474 |
475 } else if (of->test_dir) { | 475 } else if (of->test_dir) { |
476 | 476 |
477 if (ngx_file_info(name, &fi) == -1) { | 477 if (ngx_file_info(name, &fi) == NGX_FILE_ERROR) { |
478 of->failed = ngx_file_info_n; | 478 of->failed = ngx_file_info_n; |
479 goto failed; | 479 goto failed; |
480 } | 480 } |
481 | 481 |
482 if (ngx_is_dir(&fi)) { | 482 if (ngx_is_dir(&fi)) { |