]> granicus.if.org Git - apache/commitdiff
*) mod_logio: Provide optional function to allow modules to adjust the
authorEric Covener <covener@apache.org>
Fri, 11 Jan 2008 15:07:53 +0000 (15:07 +0000)
committerEric Covener <covener@apache.org>
Fri, 11 Jan 2008 15:07:53 +0000 (15:07 +0000)
   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
include/http_core.h
modules/loggers/mod_logio.c

diff --git a/CHANGES b/CHANGES
index 409a4f8842b94ac76c39814efdca9ecf0770cec2..f5607f95ac884abd3158af840d27947408a5c2ed 100644 (file)
--- 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 [<rahul sun.com>]
 
index aadab1eb6747b4f96e10b6ace50cf8496055cfd1..31b14895ee984a0981c0cabe30895c63d0c01d57 100644 (file)
@@ -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
index 737c277aeae340b80ff0e5035cd625dc33660621..fa8dc2178f7dae8c0a0adffd8b4b5119f666bc00 100644 (file)
@@ -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 =