Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 7189 invoked by uid 500); 1 Mar 2002 05:43:59 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 7178 invoked by uid 500); 1 Mar 2002 05:43:59 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 1 Mar 2002 05:43:57 -0000 Message-ID: <20020301054357.10603.qmail@icarus.apache.org> From: jwoolley@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/experimental mod_charset_lite.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jwoolley 02/02/28 21:43:57 Modified: modules/experimental mod_charset_lite.c Log: 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. Revision Changes Path 1.58 +2 -13 httpd-2.0/modules/experimental/mod_charset_lite.c Index: mod_charset_lite.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_charset_lite.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -u -r1.57 -r1.58 --- mod_charset_lite.c 28 Jan 2002 00:43:48 -0000 1.57 +++ mod_charset_lite.c 1 Mar 2002 05:43:57 -0000 1.58 @@ -979,17 +979,6 @@ 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 @@ } } 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 @@ * 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;