diff options
author | Igor Sysoev <igor@sysoev.ru> | 2019-11-14 16:39:48 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2019-11-14 16:39:48 +0300 |
commit | 57e326b4119863f737d8677adc69dc53c7e4ed27 (patch) | |
tree | f80e27a6ea8ed77bbfa8d94ce5c3b98b42e5188b /src/nxt_http_request.c | |
parent | 643c433f8eb72cfe7d29d4f624888df646480477 (diff) | |
download | unit-57e326b4119863f737d8677adc69dc53c7e4ed27.tar.gz unit-57e326b4119863f737d8677adc69dc53c7e4ed27.tar.bz2 |
Introduced chained buffer completion handlers.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http_request.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c index 394411a9..d40393b7 100644 --- a/src/nxt_http_request.c +++ b/src/nxt_http_request.c @@ -483,15 +483,20 @@ nxt_http_buf_mem(nxt_task_t *task, nxt_http_request_t *r, size_t size) static void nxt_http_request_mem_buf_completion(nxt_task_t *task, void *obj, void *data) { - nxt_buf_t *b; + nxt_buf_t *b, *next; nxt_http_request_t *r; b = obj; r = data; - nxt_mp_free(r->mem_pool, b); + do { + next = b->next; - nxt_mp_release(r->mem_pool); + nxt_mp_free(r->mem_pool, b); + nxt_mp_release(r->mem_pool); + + b = next; + } while (b != NULL); } |