httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: [PATCH] Avoid unnecessary brigade splits on core input and output filters. WAS: EOS or FLUSH buckets
Date Thu, 12 Jun 2003 08:30:57 GMT
--On Wednesday, June 11, 2003 5:14 PM -0400 Cliff Woolley 
<jwoolley@virginia.edu> wrote:

> On Tue, 10 Jun 2003, Justin Erenkrantz wrote:
>
>> What you are really wanting to do is a partial concatenation of the brigade.
>> Something like (not there, but it could be easily added):
>>
>> APR_BRIGADE_CONCAT_UNTIL(b, ctx->b, e)
>
> I'm not sure I see exactly where you're going, but you might be able to
> get what you want by doing an APR_RING_SPLICE().

Perhaps.  My thought is that all of ctx->b up to e should be inserted into b.

for (bucket = APR_BUCKET_FIRST(ctx->b);
     bucket != e && bucket != APR_BRIGADE_LAST(ctx->b);
     bucket = APR_BUCKET_NEXT(bucket)) {
   apr_bucket_remove(bucket);
   APR_BRIGADE_INSERT_TAIL(b, bucket);
}

Um, something like that.  It's 1AM and that's about all the pseudocode I can 
write.

If APR_RING_SPLICE can do it, yea.  But, I've found apr_ring.h to be a 
complete black hole.  If you understand the type safety checks it is 
attempting, you are a far more intelligent person than I.  =)  -- justin

Mime
View raw message