]> granicus.if.org Git - apache/commitdiff
a kind fix for a compile error unfortunately broke an order
authorJeff Trawick <trawick@apache.org>
Thu, 26 Feb 2004 20:00:55 +0000 (20:00 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 26 Feb 2004 20:00:55 +0000 (20:00 +0000)
dependency...  the buffered logs array needs to be initialized
prior to opening the logs

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

modules/loggers/mod_log_config.c

index 1ea9318a6e8438ca5c3ae9afdcf97ac995cef229..ec537616de11f0f4d3030c5ab47c7270577ca5ae 100644 (file)
@@ -1176,10 +1176,17 @@ static apr_status_t flush_all_logs(void *data)
 
 static int init_config_log(apr_pool_t *pc, apr_pool_t *p, apr_pool_t *pt, server_rec *s)
 {
-    /* First, do "physical" server, which gets default log fd and format
+    int res;
+
+    /* First init the buffered logs array, which is needed when opening the logs. */
+    if (buffered_logs) {
+        all_buffered_logs = apr_array_make(p, 5, sizeof(buffered_log *));
+    }
+
+    /* Next, do "physical" server, which gets default log fd and format
      * for the virtual servers, if they don't override...
      */
-    int res = open_multi_logs(s, p);
+    res = open_multi_logs(s, p);
 
     /* Then, virtual servers */
 
@@ -1187,11 +1194,6 @@ static int init_config_log(apr_pool_t *pc, apr_pool_t *p, apr_pool_t *pt, server
         res = open_multi_logs(s, p);
     }
 
-    /* Finally init buffered logs */
-    if (buffered_logs) {
-        all_buffered_logs = apr_array_make(p, 5, sizeof(buffered_log *));
-    }
-
     return res;
 }