Welcome! Log In Create A New Profile

Advanced

[nginx] Request cleanup code unified, no functional changes.

Maxim Dounin
September 04, 2013 01:38PM
details: http://hg.nginx.org/nginx/rev/31af4ae8ad9c
branches:
changeset: 5363:31af4ae8ad9c
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Sep 04 21:17:00 2013 +0400
description:
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.

diffstat:

src/http/ngx_http_request.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diffs (20 lines):

diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -3343,10 +3343,15 @@ ngx_http_free_request(ngx_http_request_t
return;
}

- for (cln = r->cleanup; cln; cln = cln->next) {
+ cln = r->cleanup;
+ r->cleanup = NULL;
+
+ while (cln) {
if (cln->handler) {
cln->handler(cln->data);
}
+
+ cln = cln->next;
}

#if (NGX_STAT_STUB)

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Request cleanup code unified, no functional changes.

Maxim Dounin 621 September 04, 2013 01:38PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 250
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready