From: Victor J. Orlikowski Date: Mon, 27 Aug 2001 20:50:01 +0000 (+0000) Subject: Fix a case where on restart, an admin started logging, and the logging X-Git-Tag: 2.0.25~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76692f2573e3c5407b0f437d9cd747e1d4e1162c;p=apache Fix a case where on restart, an admin started logging, and the logging 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 --- diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 58ccaa3432..e6f2a713a4 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -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) { diff --git a/modules/loggers/mod_log_config.h b/modules/loggers/mod_log_config.h index d30409f804..9d26c046f3 100644 --- a/modules/loggers/mod_log_config.h +++ b/modules/loggers/mod_log_config.h @@ -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