You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2012/12/04 03:28:17 UTC

svn commit: r1416749 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS modules/debugging/mod_dumpio.c

Author: covener
Date: Tue Dec  4 02:28:16 2012
New Revision: 1416749

URL: http://svn.apache.org/viewvc?rev=1416749&view=rev
Log:
Merge r1412278 from https://svn.apache.org/repos/asf/httpd/httpd/trunk/:

mod_dumpio: Correctly log large messages + style issues
PR 54179 

Submitted by: Marek Wianecki
Reviewed by: jailletc36, sf, druggeri



Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/debugging/mod_dumpio.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1412278

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1416749&r1=1416748&r2=1416749&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Tue Dec  4 02:28:16 2012
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.4
 
+  *) mod_dumpio: Correctly log large messages
+     PR 54179 [Marek Wianecki <mieszek2 interia pl>]
+
   *) core: Don't fail at startup with AH00554 when Include points to 
      a directory without any wildcard character. [Eric Covener]
 

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1416749&r1=1416748&r2=1416749&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Tue Dec  4 02:28:16 2012
@@ -91,12 +91,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * mod_dumpio: Correctly log large messages
-      PR 54179 
-      trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1412278
-      2.4.x patch: http://people.apache.org/~jailletc36/backport_mod_dumpio.patch
-      +1: jailletc36, sf, druggeri
-     
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 

Modified: httpd/httpd/branches/2.4.x/modules/debugging/mod_dumpio.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/debugging/mod_dumpio.c?rev=1416749&r1=1416748&r2=1416749&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/debugging/mod_dumpio.c (original)
+++ httpd/httpd/branches/2.4.x/modules/debugging/mod_dumpio.c Tue Dec  4 02:28:16 2012
@@ -45,7 +45,7 @@ typedef struct dumpio_conf_t {
  * line length of all \xNN sequences; log_error cannot record more
  * than MAX_STRING_LEN characters.
  */
-#define dumpio_MAX_STRING_LEN MAX_STRING_LEN / 4 - 80
+#define dumpio_MAX_STRING_LEN (MAX_STRING_LEN / 4 - 80)
 
 /*
  * Workhorse function: simply log to the current error_log
@@ -102,8 +102,10 @@ static void dumpit(ap_filter_t *f, apr_b
                               (APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
                               b->type->name, (int)logbytes, buf);
 #endif
+                buf += logbytes;
             }
-        } else {
+        }
+        else {
             ap_log_cerror(APLOG_MARK, APLOG_TRACE7, rv, c,
                           "mod_dumpio:  %s (%s-%s): %s", f->frec->name,
                           (APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
@@ -135,7 +137,7 @@ static int dumpio_input_filter (ap_filte
                   f->frec->name,
                   whichmode(mode),
                   ((block) == APR_BLOCK_READ) ? "blocking" : "nonblocking",
-                  readbytes) ;
+                  readbytes);
 
     ret = ap_get_brigade(f->next, bb, mode, block, readbytes);
 
@@ -143,7 +145,8 @@ static int dumpio_input_filter (ap_filte
         for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) {
           dumpit(f, b, ptr);
         }
-    } else {
+    }
+    else {
         ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
                       "mod_dumpio: %s - %d", f->frec->name, ret) ;
         return ret;
@@ -205,15 +208,15 @@ static void dumpio_register_hooks(apr_po
 static void *dumpio_create_sconfig(apr_pool_t *p, server_rec *s)
 {
     dumpio_conf_t *ptr = apr_pcalloc(p, sizeof *ptr);
-    ptr->enable_input = ptr->enable_output = 0;
+    ptr->enable_input = 0;
+    ptr->enable_output = 0;
     return ptr;
 }
 
 static const char *dumpio_enable_input(cmd_parms *cmd, void *dummy, int arg)
 {
-    dumpio_conf_t *ptr =
-    (dumpio_conf_t *) ap_get_module_config(cmd->server->module_config,
-                                           &dumpio_module);
+    dumpio_conf_t *ptr = ap_get_module_config(cmd->server->module_config,
+                                              &dumpio_module);
 
     ptr->enable_input = arg;
     return NULL;
@@ -221,9 +224,8 @@ static const char *dumpio_enable_input(c
 
 static const char *dumpio_enable_output(cmd_parms *cmd, void *dummy, int arg)
 {
-    dumpio_conf_t *ptr =
-    (dumpio_conf_t *) ap_get_module_config(cmd->server->module_config,
-                                           &dumpio_module);
+    dumpio_conf_t *ptr = ap_get_module_config(cmd->server->module_config,
+                                              &dumpio_module);
 
     ptr->enable_output = arg;
     return NULL;
@@ -239,10 +241,10 @@ static const command_rec dumpio_cmds[] =
 
 AP_DECLARE_MODULE(dumpio) = {
         STANDARD20_MODULE_STUFF,
-        NULL,
-        NULL,
-        dumpio_create_sconfig,
-        NULL,
-        dumpio_cmds,
-        dumpio_register_hooks
+        NULL,                   /* create per-dir    config structures */
+        NULL,                   /* merge  per-dir    config structures */
+        dumpio_create_sconfig,  /* create per-server config structures */
+        NULL,                   /* merge  per-server config structures */
+        dumpio_cmds,            /* table of config file commands       */
+        dumpio_register_hooks   /* register hooks                      */
 };