* new bucket brigade is returned in this location.
* @param b The bucket brigade to save aside. This brigade is always empty
* on return
- * @deffunc void ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to, ap_bucket_brigade **b)
+ * @deffunc apr_status_t ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to, ap_bucket_brigade **b)
*/
-AP_DECLARE(void) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to,
- ap_bucket_brigade **b);
+AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to,
+ ap_bucket_brigade **b);
#ifdef __cplusplus
}
return AP_NOBODY_WROTE;
}
-AP_DECLARE(void) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **saveto,
- ap_bucket_brigade **b)
+AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **saveto,
+ ap_bucket_brigade **b)
{
ap_bucket *e;
apr_pool_t *p = f->r ? f->r->pool : f->c->pool;
+ apr_status_t rv;
/* If have never stored any data in the filter, then we had better
* create an empty bucket brigade so that we can concat.
}
AP_RING_FOREACH(e, &(*b)->list, ap_bucket, link) {
- ap_bucket_setaside(e);
+ rv = ap_bucket_setaside(e);
+ if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+ return rv;
+ }
}
AP_BRIGADE_CONCAT(*saveto, *b);
+ return APR_SUCCESS;
}