Skip to content

Commit ed7dd91

Browse files
committed
a kind fix for a compile error unfortunately broke an order
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
1 parent deb549b commit ed7dd91

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

modules/loggers/mod_log_config.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,22 +1176,24 @@ static apr_status_t flush_all_logs(void *data)
11761176

11771177
static int init_config_log(apr_pool_t *pc, apr_pool_t *p, apr_pool_t *pt, server_rec *s)
11781178
{
1179-
/* First, do "physical" server, which gets default log fd and format
1179+
int res;
1180+
1181+
/* First init the buffered logs array, which is needed when opening the logs. */
1182+
if (buffered_logs) {
1183+
all_buffered_logs = apr_array_make(p, 5, sizeof(buffered_log *));
1184+
}
1185+
1186+
/* Next, do "physical" server, which gets default log fd and format
11801187
* for the virtual servers, if they don't override...
11811188
*/
1182-
int res = open_multi_logs(s, p);
1189+
res = open_multi_logs(s, p);
11831190

11841191
/* Then, virtual servers */
11851192

11861193
for (s = s->next; (res == OK) && s; s = s->next) {
11871194
res = open_multi_logs(s, p);
11881195
}
11891196

1190-
/* Finally init buffered logs */
1191-
if (buffered_logs) {
1192-
all_buffered_logs = apr_array_make(p, 5, sizeof(buffered_log *));
1193-
}
1194-
11951197
return res;
11961198
}
11971199

0 commit comments

Comments
 (0)