]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) Add apr_bucket_setaside_noop to use for buckets that do not require a
authorGreg Stein <gstein@apache.org>
Thu, 7 Jun 2001 10:13:25 +0000 (10:13 +0000)
committerGreg Stein <gstein@apache.org>
Thu, 7 Jun 2001 10:13:25 +0000 (10:13 +0000)
   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

server/util_filter.c

index ef9a55262f8a04aaa8a95d5822f76523f7cd0e8c..338ae8beae23361195cb821efc7dc387e94faa9c 100644 (file)
@@ -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;
         }
     }