From: Greg Ames Date: Sat, 16 Nov 2002 02:27:33 +0000 (+0000) Subject: core_output_filter: back out changes to clean up resources before the end X-Git-Tag: 2.0.44~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f19f059390a5f06dc9bb0fa7c216b3338275f4a7;p=apache core_output_filter: back out changes to clean up resources before the end of a keepalive connection until we can figure out how to do it safely for mmap buckets git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97539 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index ed04d5c785..ceb5627f17 100644 --- a/server/core.c +++ b/server/core.c @@ -3665,12 +3665,11 @@ static APR_OPTIONAL_FN_TYPE(ap_logio_add_bytes_out) *logio_add_bytes_out; static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b) { apr_status_t rv; - apr_bucket_brigade *more; /* definition moved to foil a gdb bug */ + apr_bucket_brigade *more; conn_rec *c = f->c; core_net_rec *net = f->ctx; core_output_filter_ctx_t *ctx = net->out_ctx; apr_read_type_e eblock = APR_NONBLOCK_READ; - apr_pool_t *input_pool = b->p; if (ctx == NULL) { ctx = apr_pcalloc(c->pool, sizeof(*ctx)); @@ -3925,10 +3924,7 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b) } } } - if (!ctx->deferred_write_pool) { - apr_pool_create(&ctx->deferred_write_pool, c->pool); - } - ap_save_brigade(f, &ctx->b, &b, ctx->deferred_write_pool); + ap_save_brigade(f, &ctx->b, &b, c->pool); return APR_SUCCESS; } @@ -3999,30 +3995,6 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b) } apr_brigade_destroy(b); - - /* drive cleanups for resources which were set aside - * this may occur before or after termination of the request which - * created the resource - */ - if (ctx->deferred_write_pool) { - if (more && more->p == ctx->deferred_write_pool) { - /* "more" belongs to the deferred_write_pool, - * which is about to be cleared. - */ - if (APR_BRIGADE_EMPTY(more)) { - more = NULL; - } - else { - /* uh oh... change more's lifetime - * to the input brigade's lifetime - */ - apr_bucket_brigade *tmp_more = more; - more = NULL; - ap_save_brigade(f, &more, &tmp_more, input_pool); - } - } - apr_pool_clear(ctx->deferred_write_pool); - } if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,