httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1467981 - in /httpd/httpd/branches/2.4.x: ./ STATUS modules/loggers/mod_log_config.c
Date Mon, 15 Apr 2013 12:42:29 GMT
Author: jim
Date: Mon Apr 15 12:42:29 2013
New Revision: 1467981

URL: http://svn.apache.org/r1467981
Log:
Merge r1467765 from trunk:

Fix crash in mod_log_config when logging
request end time for a failed request
(LogFormat contains %{end}t).

The request_config for mod_log_config might
not be initialized.

PR 54828.

Submitted by: rjung
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c

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

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1467981&r1=1467980&r2=1467981&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Apr 15 12:42:29 2013
@@ -90,12 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_log_config: Fix crash when logging request end time for a failed request.
-     PR 54828
-     trunk patch: http://svn.apache.org/r1467765
-     2.4.x patch: trunk patchs applies
-     +1: rjung, covener, jim
-
 
 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/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c?rev=1467981&r1=1467980&r2=1467981&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c Mon Apr 15 12:42:29 2013
@@ -597,6 +597,10 @@ static apr_time_t get_request_end_time(r
 {
     log_request_state *state = (log_request_state *)ap_get_module_config(r->request_config,
                                                                          &log_config_module);
+    if (!state) {
+        state = apr_pcalloc(r->pool, sizeof(log_request_state));
+        ap_set_module_config(r->request_config, &log_config_module, state);
+    }
     if (state->request_end_time == 0) {
         state->request_end_time = apr_time_now();
     }



Mime
View raw message