diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-03-23 16:14:51 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-03-23 16:14:51 +0300 |
commit | 52859f2f1309fc8452f1cf182b712ae2d72bc40c (patch) | |
tree | f87d424675f857d0dcebdc80ce3828389d75a69b /src/core/ngx_palloc.c | |
parent | 1af7090b5091ebbee1cd9354fe8a702e601a8ce0 (diff) |
a prelimiary proxy cache support
Diffstat (limited to 'src/core/ngx_palloc.c')
-rw-r--r-- | src/core/ngx_palloc.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/ngx_palloc.c b/src/core/ngx_palloc.c index 7c89fda70..3e1c9f2ad 100644 --- a/src/core/ngx_palloc.c +++ b/src/core/ngx_palloc.c @@ -326,6 +326,27 @@ ngx_pool_cleanup_add(ngx_pool_t *p, size_t size) void +ngx_pool_run_cleanup_file(ngx_pool_t *p, ngx_fd_t fd) +{ + ngx_pool_cleanup_t *c; + ngx_pool_cleanup_file_t *cf; + + for (c = p->cleanup; c; c = c->next) { + if (c->handler == ngx_pool_cleanup_file) { + + cf = c->data; + + if (cf->fd == fd) { + c->handler(cf); + c->handler = NULL; + return; + } + } + } +} + + +void ngx_pool_cleanup_file(void *data) { ngx_pool_cleanup_file_t *c = data; |