comparison src/http/modules/proxy/ngx_http_proxy_cache.c @ 186:c1f3a3c7c5db

nginx-0.0.1-2003-11-17-00:49:42 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 16 Nov 2003 21:49:42 +0000
parents d5f50cefc322
children c966c09be66b
comparison
equal deleted inserted replaced
185:d5f50cefc322 186:c1f3a3c7c5db
268 p->try_busy_lock = 0; 268 p->try_busy_lock = 0;
269 269
270 if (p->cache->ctx.file.fd != NGX_INVALID_FILE 270 if (p->cache->ctx.file.fd != NGX_INVALID_FILE
271 && !p->cache->ctx.file.info_valid) 271 && !p->cache->ctx.file.info_valid)
272 { 272 {
273 if (ngx_stat_fd(p->cache->ctx.file.fd, &p->cache->ctx.file.info) 273 if (ngx_fd_info(p->cache->ctx.file.fd, &p->cache->ctx.file.info)
274 == NGX_FILE_ERROR) 274 == NGX_FILE_ERROR)
275 { 275 {
276 ngx_log_error(NGX_LOG_CRIT, p->request->connection->log, ngx_errno, 276 ngx_log_error(NGX_LOG_CRIT, p->request->connection->log, ngx_errno,
277 ngx_stat_fd_n " \"%s\" failed", 277 ngx_fd_info_n " \"%s\" failed",
278 p->cache->ctx.file.name.data); 278 p->cache->ctx.file.name.data);
279 ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR); 279 ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR);
280 return; 280 return;
281 } 281 }
282 282
320 } 320 }
321 321
322 *ctx = p->cache->ctx; 322 *ctx = p->cache->ctx;
323 323
324 rc = ngx_http_cache_open_file(p->request, ctx, 324 rc = ngx_http_cache_open_file(p->request, ctx,
325 ngx_file_uniq((&p->cache->ctx.file.info))); 325 ngx_file_uniq(&p->cache->ctx.file.info));
326 326
327 if (rc == NGX_HTTP_CACHE_THE_SAME) { 327 if (rc == NGX_HTTP_CACHE_THE_SAME) {
328 p->try_busy_lock = 1; 328 p->try_busy_lock = 1;
329 p->busy_lock.time = 0; 329 p->busy_lock.time = 0;
330 ngx_http_proxy_cache_busy_lock(p); 330 ngx_http_proxy_cache_busy_lock(p);