diff options
author | Yann Ylavic <ylavic@apache.org> | 2018-07-19 00:40:32 +0200 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2018-07-19 00:40:32 +0200 |
commit | 69fd1f06420a37e4595f3b7fb0c77e34d6cfc251 (patch) | |
tree | 4f98e8d7c352dd135a31b8ecc4566b6d23cb9d9c /server | |
parent | core: integrate data_in_{in,out}put_filter to ap_filter_{in,out}put_pending(). (diff) | |
download | apache2-69fd1f06420a37e4595f3b7fb0c77e34d6cfc251.tar.xz apache2-69fd1f06420a37e4595f3b7fb0c77e34d6cfc251.zip |
core: avoid double loop in ap_filter_output_pending().
Since ap_filter_output_pending() is looping on the relevant filters already,
we don't need to use ap_filter_should_yield() to check upstream filters.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1836240 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r-- | server/util_filter.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/util_filter.c b/server/util_filter.c index 22af83d8bc..5d35c96b10 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -1004,7 +1004,6 @@ AP_DECLARE(int) ap_filter_should_yield(ap_filter_t *f) AP_DECLARE_NONSTD(int) ap_filter_output_pending(conn_rec *c) { - int data_in_output_filters = DECLINED; apr_bucket_brigade *bb; ap_filter_t *f; @@ -1035,13 +1034,13 @@ AP_DECLARE_NONSTD(int) ap_filter_output_pending(conn_rec *c) return rv; } - if (ap_filter_should_yield(f)) { - data_in_output_filters = OK; + if (f->bb && !APR_BRIGADE_EMPTY(f->bb)) { + return OK; } } } - return data_in_output_filters; + return DECLINED; } AP_DECLARE_NONSTD(int) ap_filter_input_pending(conn_rec *c) |