]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
util_filter: both directions for setaside/reinstate/adapt logging.
authorYann Ylavic <ylavic@apache.org>
Sun, 31 May 2020 17:04:13 +0000 (17:04 +0000)
committerYann Ylavic <ylavic@apache.org>
Sun, 31 May 2020 17:04:13 +0000 (17:04 +0000)
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

server/util_filter.c

index 649615bf80a10fcb2080307583d65e05381386f6..c537b00f73ac3db5e6013fc77b931d95e449f6e7 100644 (file)
@@ -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) {