Mercurial > hg > nginx-quic
comparison src/http/ngx_http_core_module.c @ 2756:09cab3f8d92e
*) of.test_only to not open file if only stat() is enough
*) of.failed to return exact name of failed syscall
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 27 Apr 2009 09:55:53 +0000 |
parents | ccaf43725ff6 |
children | d478379e51ac |
comparison
equal
deleted
inserted
replaced
2755:a65976a205a5 | 2756:09cab3f8d92e |
---|---|
1167 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); | 1167 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); |
1168 | 1168 |
1169 of.directio = clcf->directio; | 1169 of.directio = clcf->directio; |
1170 of.valid = clcf->open_file_cache_valid; | 1170 of.valid = clcf->open_file_cache_valid; |
1171 of.min_uses = clcf->open_file_cache_min_uses; | 1171 of.min_uses = clcf->open_file_cache_min_uses; |
1172 of.test_only = 1; | |
1172 of.errors = clcf->open_file_cache_errors; | 1173 of.errors = clcf->open_file_cache_errors; |
1173 of.events = clcf->open_file_cache_events; | 1174 of.events = clcf->open_file_cache_events; |
1174 | 1175 |
1175 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) | 1176 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) |
1176 != NGX_OK) | 1177 != NGX_OK) |
1177 { | 1178 { |
1178 if (of.err != NGX_ENOENT && of.err != NGX_ENOTDIR) { | 1179 if (of.err != NGX_ENOENT && of.err != NGX_ENOTDIR) { |
1179 ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err, | 1180 ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err, |
1180 ngx_open_file_n " \"%s\" failed", path.data); | 1181 "%s \"%s\" failed", of.failed, path.data); |
1181 } | 1182 } |
1182 | 1183 |
1183 continue; | 1184 continue; |
1184 } | 1185 } |
1185 | 1186 |