From: Cliff Woolley Date: Fri, 1 Mar 2002 05:43:57 +0000 (+0000) Subject: We don't need transfer_brigade() because we already have macros to do that X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fd57a116d4a6f0ba71b327ffeba702066f4a879;p=apache We don't need transfer_brigade() because we already have macros to do that for us, and faster. :) Warning, though: transfer_brigade() was equivalent to APR_BRIGADE_CONCAT(), and I don't think that was the right behavior for one of the two callers! I changed that one to use APR_BRIGADE_PREPEND() since by my inspection that looks like what it should be, but please check me on this. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93654 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/mod_charset_lite.c b/modules/experimental/mod_charset_lite.c index 935de560b0..cdc48296af 100644 --- a/modules/experimental/mod_charset_lite.c +++ b/modules/experimental/mod_charset_lite.c @@ -979,17 +979,6 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb) return rv; } -static void transfer_brigade(apr_bucket_brigade *in, apr_bucket_brigade *out) -{ - apr_bucket *b; - - while (!APR_BRIGADE_EMPTY(in)) { - b = APR_BRIGADE_FIRST(in); - APR_BUCKET_REMOVE(b); - APR_BRIGADE_INSERT_TAIL(out, b); - } -} - static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes) @@ -1046,7 +1035,7 @@ static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb, } } else { - transfer_brigade(ctx->bb, bb); /* first use the leftovers */ + APR_BRIGADE_PREPEND(bb, ctx->bb); /* first use the leftovers */ } buffer_size = INPUT_XLATE_BUF_SIZE; @@ -1058,7 +1047,7 @@ static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb, * down below, but I suspect that for long-term we need to * do that */ - transfer_brigade(bb, ctx->bb); + APR_BRIGADE_CONCAT(ctx->bb, bb); } if (buffer_size < INPUT_XLATE_BUF_SIZE) { /* do we have output? */ apr_bucket *e;