From: Yann Ylavic Date: Sun, 31 May 2020 17:04:13 +0000 (+0000) Subject: util_filter: both directions for setaside/reinstate/adapt logging. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1406 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=686b9492193fc7dd7f318f7b1b194358780d9070;p=thirdparty%2Fapache%2Fhttpd.git util_filter: both directions for setaside/reinstate/adapt logging. ap_filter_{setaside,reinstate,adopt}() can be called by both input and output filters, so adapt confusing (always out) logging. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1878332 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_filter.c b/server/util_filter.c index 649615bf80a..c537b00f73a 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -950,10 +950,11 @@ AP_DECLARE(apr_status_t) ap_filter_setaside_brigade(ap_filter_t *f, struct ap_filter_private *fp = f->priv; ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, f->c, - "setaside %s brigade to %s brigade in '%s' output filter", + "setaside %s brigade to %s brigade in '%s' %sput filter", APR_BRIGADE_EMPTY(bb) ? "empty" : "full", (!fp->bb || APR_BRIGADE_EMPTY(fp->bb)) ? "empty" : "full", - f->frec->name); + f->frec->name, + f->frec->direction == AP_FILTER_INPUT ? "in" : "out"); /* This API is not suitable for request filters */ if (f->frec->ftype < AP_FTYPE_CONNECTION) { @@ -1041,10 +1042,11 @@ AP_DECLARE(void) ap_filter_adopt_brigade(ap_filter_t *f, struct ap_filter_private *fp = f->priv; ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, f->c, - "adopt %s brigade to %s brigade in '%s' output filter", + "adopt %s brigade to %s brigade in '%s' %sput filter", APR_BRIGADE_EMPTY(bb) ? "empty" : "full", (!fp->bb || APR_BRIGADE_EMPTY(fp->bb)) ? "empty" : "full", - f->frec->name); + f->frec->name, + f->frec->direction == AP_FILTER_INPUT ? "in" : "out"); if (!APR_BRIGADE_EMPTY(bb)) { ap_filter_prepare_brigade(f); @@ -1063,10 +1065,11 @@ AP_DECLARE(apr_status_t) ap_filter_reinstate_brigade(ap_filter_t *f, core_server_config *conf; ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, f->c, - "reinstate %s brigade to %s brigade in '%s' output filter", + "reinstate %s brigade to %s brigade in '%s' %sput filter", (!fp->bb || APR_BRIGADE_EMPTY(fp->bb) ? "empty" : "full"), (APR_BRIGADE_EMPTY(bb) ? "empty" : "full"), - f->frec->name); + f->frec->name, + f->frec->direction == AP_FILTER_INPUT ? "in" : "out"); /* This API is not suitable for request filters */ if (f->frec->ftype < AP_FTYPE_CONNECTION) {