From 7f4afedb577e29bb4dad0915e14985336e7859e0 Mon Sep 17 00:00:00 2001 From: Tony Finch Date: Sat, 9 Sep 2000 01:11:15 +0000 Subject: [PATCH] Fix inserting elements at the head and tail of a ring when the ring is empty. Avoiding referring to the element type in the macros resulted in some double dereferences that did the wrong thing. Reported by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86184 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/http/http_core.c b/modules/http/http_core.c index cdedb15821..e302dfd012 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2930,14 +2930,14 @@ static apr_status_t pass_chunk(ap_filter_t *f, ap_bucket_brigade *b, } hdr_len = apr_snprintf(chunk_hdr, sizeof(chunk_hdr), "%qx" CRLF, bytes); e = ap_bucket_create_transient(chunk_hdr, hdr_len); - AP_RING_INSERT_HEAD(&b->list, e, link); + AP_RING_INSERT_HEAD(&b->list, e, ap_bucket, link); if (eos) { /* any trailer should go between the last two CRLFs */ e = ap_bucket_create_immortal(CRLF "0" CRLF CRLF, 7); AP_RING_INSERT_BEFORE(AP_RING_LAST(&b->list), e, link); } else { e = ap_bucket_create_immortal(CRLF, 2); - AP_RING_INSERT_TAIL(&b->list, e, link); + AP_RING_INSERT_TAIL(&b->list, e, ap_bucket, link); } return ap_pass_brigade(f->next, b); } -- 2.40.0