httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: [Patch] Async write completion for the full connection filter stack
Date Fri, 12 Sep 2014 15:22:18 GMT
On Fri, Sep 12, 2014 at 4:57 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> AP_DECLARE(int) ap_filter_reinstate_brigade(ap_filter_t *f,
>                                             ap_filter_aside_t *aside,
>                                             apr_bucket_brigade *bb,
>                                             apr_bucket **flush_upto)
> {
>     apr_bucket *bucket, *next;
>     apr_size_t bytes_in_brigade, non_file_bytes_in_brigade;
>     int eor_buckets_in_brigade, morphing_bucket_in_brigade;
>     int loglevel = ap_get_conn_module_loglevel(f->c, APLOG_MODULE_INDEX);
>     int empty = APR_BRIGADE_EMPTY(bb);
>
>     if ((*aside)->bb && !APR_BRIGADE_EMPTY((*aside)->bb)) {
>         APR_BRIGADE_PREPEND(bb, (*aside)->bb);
>         f->c->data_in_output_filters--;
>         if (empty) {
>             return 1;
>         }
>     }

The (empty) check could even be done outside the block, in any case.

>
>     ...
> }

Mime
View raw message