From: Greg Stein Date: Thu, 7 Jun 2001 10:13:25 +0000 (+0000) Subject: *) Add apr_bucket_setaside_noop to use for buckets that do not require a X-Git-Tag: 2.0.19~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e11444a8ded0e330679f208d1527b03575c6416;p=thirdparty%2Fapache%2Fhttpd.git *) Add apr_bucket_setaside_noop to use for buckets that do not require a setaside function. It simply returns APR_SUCCESS. - adjust the EOS, FLUSH, IMMORTAL, and HEAP buckets to use _noop. *) Make the setaside() function take a pool to define the (new) lifetime for the bucket's data. - Adjust the apr_bucket_setaside() macro. - Adjust the apr_bucket_setaside_notimpl() and transient_setaside() functions. - Pass the additional parameter in ap_save_brigade() *) Update docs for setaside() *) Minor nit with macros in apr_buckets.h: add parens for binding safety. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89289 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_filter.c b/server/util_filter.c index ef9a55262f8..338ae8beae2 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -248,6 +248,8 @@ AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, apr_bucket_brigade **sa apr_bucket_brigade **b) { apr_bucket *e; + /* ### this pool should be passed in; the caller is the only one who + ### really knows what the proper lifetime is for this pool. */ apr_pool_t *p = f->r ? f->r->pool : f->c->pool; apr_status_t rv; @@ -259,8 +261,11 @@ AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, apr_bucket_brigade **sa } APR_RING_FOREACH(e, &(*b)->list, apr_bucket, link) { - rv = apr_bucket_setaside(e); - if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) { + rv = apr_bucket_setaside(e, p); + if (rv != APR_SUCCESS + /* ### this ENOTIMPL will go away once we implement setaside + ### for all bucket types. */ + && rv != APR_ENOTIMPL) { return rv; } }