Mercurial > hg > nginx-vendor-current
comparison src/core/ngx_open_file_cache.c @ 370:9a242235a80a NGINX_0_6_29
nginx 0.6.29
*) Feature: the ngx_google_perftools_module.
*) Bugfix: the ngx_http_perl_module could be not built on 64-bit
platforms; bug appeared in 0.6.27.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 18 Mar 2008 00:00:00 +0300 |
parents | 9121a0a91f47 |
children | 67fa3851697b |
comparison
equal
deleted
inserted
replaced
369:5906b8639a07 | 370:9a242235a80a |
---|---|
306 goto create; | 306 goto create; |
307 } | 307 } |
308 | 308 |
309 /* not found */ | 309 /* not found */ |
310 | 310 |
311 file = NULL; | |
312 | |
313 rc = ngx_open_and_stat_file(name->data, of, pool->log); | 311 rc = ngx_open_and_stat_file(name->data, of, pool->log); |
314 | 312 |
315 if (rc != NGX_OK && (of->err == 0 || !of->errors)) { | 313 if (rc != NGX_OK && (of->err == 0 || !of->errors)) { |
316 goto failed; | 314 goto failed; |
317 } | 315 } |
411 if (file && file->count == 0) { | 409 if (file && file->count == 0) { |
412 ngx_rbtree_delete(&cache->rbtree, &file->node); | 410 ngx_rbtree_delete(&cache->rbtree, &file->node); |
413 | 411 |
414 cache->current--; | 412 cache->current--; |
415 | 413 |
416 if (ngx_close_file(file->fd) == NGX_FILE_ERROR) { | 414 if (file->fd != NGX_INVALID_FILE) { |
417 ngx_log_error(NGX_LOG_ALERT, pool->log, ngx_errno, | 415 if (ngx_close_file(file->fd) == NGX_FILE_ERROR) { |
418 ngx_close_file_n " \"%s\" failed", file->name); | 416 ngx_log_error(NGX_LOG_ALERT, pool->log, ngx_errno, |
417 ngx_close_file_n " \"%s\" failed", file->name); | |
418 } | |
419 } | 419 } |
420 | 420 |
421 ngx_free(file->name); | 421 ngx_free(file->name); |
422 ngx_free(file); | 422 ngx_free(file); |
423 } | 423 } |