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
