httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] allocate properly-sized buffer for header
Date Thu, 25 Jan 2001 20:54:06 GMT
On Thu, Jan 25, 2001 at 12:35:55PM -0800, rbb@covalent.net wrote:
>...
> > > Hmm. I presume you're thinking of passing a "flush function" down to the
> > > apr_brigade_* functions? That just might work.
> > > 
> > > Looking forward to your half-patch :-)
> > 
> > Not quite.  I think you'll like it, but it may take a while for me to get
> > to it.  Expect it by the end of the day today.
> 
> BTW, my only concern with that, is what is the API for the flush
> function?  I would rather not assume it looks like ap_pass_brigade.

apr_status_t flush_function(apr_brigade_t *brigade, void *flush_ctx);

The user can store whatever it needs in the flush_ctx. For example, we'd do
the following:

apr_status_t flush_to_filters(apr_brigade_t *brigade, void *flush_ctx)
{
    return ap_pass_brigade(flush_ctx, brigade);
}

And invoke the brigade write function as:

  status = apr_brigade_write(bb, buf, size,
                             flush_to_filters, r->output_filters);

> Patch coming sometime today, I promise.  :-)

Whenever. No great rush.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message