Commit 8c81b2e6 authored by Victor J. Orlikowski's avatar Victor J. Orlikowski
Browse files

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
parent 10eac7c0
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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,8 +1025,11 @@ 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);
        /* If logging for the first time after a restart, keep going. */
        if (!ap_my_generation) {
            return cls;
        }
    }

    if (cls->log_fd != NULL) {
        return cls;             /* virtual config shared w/main server */
+1 −0
Original line number Diff line number Diff line
@@ -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