httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1082518 - in /httpd/httpd/trunk: CHANGES modules/loggers/mod_log_config.c
Date Thu, 17 Mar 2011 15:04:08 GMT
Author: jim
Date: Thu Mar 17 15:04:08 2011
New Revision: 1082518

URL: http://svn.apache.org/viewvc?rev=1082518&view=rev
Log:
Close PR 50861 where enabling and disabling of buffered
logs can cause a segfault. Patch by: Torsten Förtsch <torsten.foertsch@gmx.net>

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/loggers/mod_log_config.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1082518&r1=1082517&r2=1082518&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Mar 17 15:04:08 2011
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.12
 
+  *) mod_log_config: Prevent segfault. PR 50861. [Torsten Förtsch
+     <torsten.foertsch gmx.net>]
+
   *) core: AllowEncodedSlashes new option NoDecode to allow encoded slashes
      in request URL path info but not decode them. Change behavior of option
      "On" to decode the encoded slashes as 2.0 and 2.2 do.  PR 35256,

Modified: httpd/httpd/trunk/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_config.c?rev=1082518&r1=1082517&r2=1082518&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/trunk/modules/loggers/mod_log_config.c Thu Mar 17 15:04:08 2011
@@ -1295,6 +1295,10 @@ static const char *set_buffered_logs_on(
         ap_log_set_writer_init(ap_buffered_log_writer_init);
         ap_log_set_writer(ap_buffered_log_writer);
     }
+    else {
+        ap_log_set_writer_init(ap_default_log_writer_init);
+        ap_log_set_writer(ap_default_log_writer);
+    }
     return NULL;
 }
 static const command_rec config_log_cmds[] =
@@ -1668,6 +1672,11 @@ static int log_pre_config(apr_pool_t *p,
         log_pfn_register(p, "R", log_handler, 1);
     }
 
+    /* reset to default conditions */
+    ap_log_set_writer_init(ap_default_log_writer_init);
+    ap_log_set_writer(ap_default_log_writer);
+    buffered_logs = 0;
+
     return OK;
 }
 



Mime
View raw message