comparison src/http/ngx_http_request.c @ 5363:31af4ae8ad9c

Request cleanup code unified, no functional changes. Additionally, detaching a cleanup chain from a request is a bit more resilent to various bugs if any.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 Sep 2013 21:17:00 +0400
parents 62be77b0608f
children ef3d094bb6d3
comparison
equal deleted inserted replaced
5362:79b9101cecf4 5363:31af4ae8ad9c
3341 if (r->pool == NULL) { 3341 if (r->pool == NULL) {
3342 ngx_log_error(NGX_LOG_ALERT, log, 0, "http request already closed"); 3342 ngx_log_error(NGX_LOG_ALERT, log, 0, "http request already closed");
3343 return; 3343 return;
3344 } 3344 }
3345 3345
3346 for (cln = r->cleanup; cln; cln = cln->next) { 3346 cln = r->cleanup;
3347 r->cleanup = NULL;
3348
3349 while (cln) {
3347 if (cln->handler) { 3350 if (cln->handler) {
3348 cln->handler(cln->data); 3351 cln->handler(cln->data);
3349 } 3352 }
3353
3354 cln = cln->next;
3350 } 3355 }
3351 3356
3352 #if (NGX_STAT_STUB) 3357 #if (NGX_STAT_STUB)
3353 3358
3354 if (r->stat_reading) { 3359 if (r->stat_reading) {