Skip to content

Commit e1a45dc

Browse files
committed
fix an old misfeature: "BufferedLogs Off" would sort-of turn
buffered logging on as it set the log writer to the buffered log writer, though it would leave the are-logs-buffered flag off this misfeature combined with recent mutex logic for buffered logs led to a segfault with "BufferedLogs Off" git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102783 13f79535-47bb-0310-9956-ffa450edef68
1 parent ed7dd91 commit e1a45dc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

modules/loggers/mod_log_config.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,8 +1041,10 @@ static const char *set_cookie_log(cmd_parms *cmd, void *dummy, const char *fn)
10411041
static const char *set_buffered_logs_on(cmd_parms *parms, void *dummy, int flag)
10421042
{
10431043
buffered_logs = flag;
1044-
ap_log_set_writer_init(ap_buffered_log_writer_init);
1045-
ap_log_set_writer(ap_buffered_log_writer);
1044+
if (buffered_logs) {
1045+
ap_log_set_writer_init(ap_buffered_log_writer_init);
1046+
ap_log_set_writer(ap_buffered_log_writer);
1047+
}
10461048
return NULL;
10471049
}
10481050
static const command_rec config_log_cmds[] =

0 commit comments

Comments
 (0)