]> granicus.if.org Git - apache/commitdiff
Fix a case where on restart, an admin started logging, and the logging
authorVictor J. Orlikowski <orlikowski@apache.org>
Mon, 27 Aug 2001 20:50:01 +0000 (20:50 +0000)
committerVictor J. Orlikowski <orlikowski@apache.org>
Mon, 27 Aug 2001 20:50:01 +0000 (20:50 +0000)
code waited to start until the second pass (assuming we were just starting
up) to open the log file. Also fix a typo.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90737 13f79535-47bb-0310-9956-ffa450edef68

modules/loggers/mod_log_config.c
modules/loggers/mod_log_config.h

index 58ccaa3432cb3d5e4e98e5f889faf44b9d66e7bf..e6f2a713a4d28fcbd103cfe48c5ffe33f7a1d816 100644 (file)
@@ -236,7 +236,7 @@ static apr_hash_t *log_hash;
  * vhost has no logs defined, we can use the main server's logs instead.
  *
  * So, for the main server, config_logs contains a list of the log files
- * and server_config_logs in empty. For a vhost, server_config_logs
+ * and server_config_logs is empty. For a vhost, server_config_logs
  * points to the same array as config_logs in the main server, and
  * config_logs points to the array of logs defined inside this vhost,
  * which might be empty.
@@ -1025,7 +1025,10 @@ static config_log_state *open_config_log(server_rec *s, apr_pool_t *p,
     if (!data) {
         apr_pool_userdata_set((const void *)1, userdata_key,
                          apr_pool_cleanup_null, s->process->pool);
-        return cls;
+        /* If logging for the first time after a restart, keep going. */
+        if (!ap_my_generation) {
+            return cls;
+        }
     }
 
     if (cls->log_fd != NULL) {
index d30409f80412678e63c2978d20b2fcfa3b8140ad..9d26c046f3021819491a78e8e5b648a4239ac999 100644 (file)
@@ -58,6 +58,7 @@
 
 #include "apr_optional.h"
 #include "httpd.h"
+#include "scoreboard.h"
 
 #ifndef _MOD_LOG_CONFIG_H
 #define _MOD_LOG_CONFIG_H 1