comparison src/core/ngx_palloc.c @ 1075:4d203f76b757

undo "client_body_in_file_only any" and introduce "client_body_in_file_only clean" introduce ngx_pool_delete_file() to not break a possible third-party ngx_pool_cleanup_file() usage that may lead to an removal of the useful files delete unnecessary ngx_http_finalize_request_body()
author Igor Sysoev <igor@sysoev.ru>
date Thu, 25 Jan 2007 08:45:04 +0000
parents 87f456ff13b0
children 103988cef757
comparison
equal deleted inserted replaced
1074:8164f479b362 1075:4d203f76b757
241 ngx_close_file_n " \"%s\" failed", c->name); 241 ngx_close_file_n " \"%s\" failed", c->name);
242 } 242 }
243 } 243 }
244 244
245 245
246 void
247 ngx_pool_delete_file(void *data)
248 {
249 ngx_pool_cleanup_file_t *c = data;
250
251 ngx_err_t err;
252
253 ngx_log_debug3(NGX_LOG_DEBUG_ALLOC, c->log, 0, "run cleanup: %p, fd:%d %s",
254 c, c->fd, c->name);
255
256 if (ngx_delete_file(c->name) == NGX_FILE_ERROR) {
257 err = ngx_errno;
258
259 if (err != NGX_ENOENT) {
260 ngx_log_error(NGX_LOG_CRIT, c->log, err,
261 ngx_delete_file_n " \"%s\" failed", c->name);
262 }
263 }
264
265 if (ngx_close_file(c->fd) == NGX_FILE_ERROR) {
266 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno,
267 ngx_close_file_n " \"%s\" failed", c->name);
268 }
269 }
270
271
246 #if 0 272 #if 0
247 273
248 static void * 274 static void *
249 ngx_get_cached_block(size_t size) 275 ngx_get_cached_block(size_t size)
250 { 276 {