comparison src/core/ngx_palloc.c @ 2592:3a8a53c0c42f

a prelimiary proxy cache support
author Igor Sysoev <igor@sysoev.ru>
date Mon, 23 Mar 2009 13:14:51 +0000
parents 3983e673cd40
children 62010fa37ead 7d8667499ddc
comparison
equal deleted inserted replaced
2591:7162ac8d564f 2592:3a8a53c0c42f
324 return c; 324 return c;
325 } 325 }
326 326
327 327
328 void 328 void
329 ngx_pool_run_cleanup_file(ngx_pool_t *p, ngx_fd_t fd)
330 {
331 ngx_pool_cleanup_t *c;
332 ngx_pool_cleanup_file_t *cf;
333
334 for (c = p->cleanup; c; c = c->next) {
335 if (c->handler == ngx_pool_cleanup_file) {
336
337 cf = c->data;
338
339 if (cf->fd == fd) {
340 c->handler(cf);
341 c->handler = NULL;
342 return;
343 }
344 }
345 }
346 }
347
348
349 void
329 ngx_pool_cleanup_file(void *data) 350 ngx_pool_cleanup_file(void *data)
330 { 351 {
331 ngx_pool_cleanup_file_t *c = data; 352 ngx_pool_cleanup_file_t *c = data;
332 353
333 ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, c->log, 0, "file cleanup: fd:%d", 354 ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, c->log, 0, "file cleanup: fd:%d",