* conn_rec, and add ring entry 'pending' in struct
* ap_filter_t
* 20180711.2 (2.5.1-dev) Add ap_reuse_brigade_from_pool()
+ * 20180716.1 (2.5.1-dev) Axe conn_rec->empty brigade
*/
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20180711
+#define MODULE_MAGIC_NUMBER_MAJOR 20180716
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 2 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
/** Array of requests being handled under this connection. */
apr_array_header_t *requests;
- /** Empty bucket brigade */
- apr_bucket_brigade *empty;
-
/** Ring of pending filters (with setaside buckets) */
struct ap_filter_ring *pending_filters;
c->id = id;
c->bucket_alloc = alloc;
- c->empty = apr_brigade_create(c->pool, c->bucket_alloc);
c->async_filter = sconf->async_filter;
c->clogging_input_filters = 0;
AP_DECLARE_NONSTD(int) ap_filter_output_pending(conn_rec *c)
{
int data_in_output_filters = DECLINED;
+ apr_bucket_brigade *bb;
ap_filter_t *f;
if (!c->pending_filters) {
return DECLINED;
}
+ bb = ap_reuse_brigade_from_pool("ap_fop_bb", c->pool,
+ c->bucket_alloc);
+
for (f = APR_RING_FIRST(c->pending_filters);
f != APR_RING_SENTINEL(c->pending_filters, ap_filter_t, pending);
f = APR_RING_NEXT(f, pending)) {
&& !APR_BRIGADE_EMPTY(f->bb)) {
apr_status_t rv;
- rv = ap_pass_brigade(f, c->empty);
- apr_brigade_cleanup(c->empty);
- if (rv != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(rv)) {
+ rv = ap_pass_brigade(f, bb);
+ apr_brigade_cleanup(bb);
+
+ if (rv != APR_SUCCESS) {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, APLOGNO(00470)
"write failure in '%s' output filter", f->frec->name);
return rv;