From d300b0e287fcefa2860f859d4356630306c23c36 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Fri, 11 Jan 2008 15:07:53 +0000 Subject: [PATCH] *) mod_logio: Provide optional function to allow modules to adjust the bytes_in count [Eric Covener] Practical example: alternate SSL implementation that lives beyond the filters (IOL) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@611199 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ include/http_core.h | 3 +++ modules/loggers/mod_logio.c | 11 +++++++++++ 3 files changed, 17 insertions(+) diff --git a/CHANGES b/CHANGES index 409a4f8842..f5607f95ac 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.3.0 [ When backported to 2.2.x, remove entry from this file ] + *) mod_logio: Provide optional function to allow modules to adjust the + bytes_in count [Eric Covener] + *) mod_rewrite: Don't canonicalise URLs with [P,NE] PR 43319 [] diff --git a/include/http_core.h b/include/http_core.h index aadab1eb67..31b14895ee 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -658,6 +658,9 @@ AP_DECLARE_HOOK(int, get_mgmt_items, APR_DECLARE_OPTIONAL_FN(void, ap_logio_add_bytes_out, (conn_rec *c, apr_off_t bytes)); +APR_DECLARE_OPTIONAL_FN(void, ap_logio_add_bytes_in, + (conn_rec *c, apr_off_t bytes)); + /* ---------------------------------------------------------------------- * * ident lookups with mod_ident diff --git a/modules/loggers/mod_logio.c b/modules/loggers/mod_logio.c index 737c277aea..fa8dc2178f 100644 --- a/modules/loggers/mod_logio.c +++ b/modules/loggers/mod_logio.c @@ -65,6 +65,16 @@ static void ap_logio_add_bytes_out(conn_rec *c, apr_off_t bytes){ cf->bytes_out += bytes; } +/* + * Optional function for modules to adjust bytes_in + */ + +static void ap_logio_add_bytes_in(conn_rec *c, apr_off_t bytes){ + logio_config_t *cf = ap_get_module_config(c->conn_config, &logio_module); + + cf->bytes_in += bytes; +} + /* * Format items... */ @@ -162,6 +172,7 @@ static void register_hooks(apr_pool_t *p) AP_FTYPE_NETWORK - 1); APR_REGISTER_OPTIONAL_FN(ap_logio_add_bytes_out); + APR_REGISTER_OPTIONAL_FN(ap_logio_add_bytes_in); } module AP_MODULE_DECLARE_DATA logio_module = -- 2.40.0