From 3273ddb6de9f0251b783d03c6e00b68121ee5b5c Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Thu, 26 Feb 2004 20:15:26 +0000 Subject: [PATCH] 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 --- modules/loggers/mod_log_config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index ec537616de..74673bbbf7 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -1041,8 +1041,10 @@ static const char *set_cookie_log(cmd_parms *cmd, void *dummy, const char *fn) static const char *set_buffered_logs_on(cmd_parms *parms, void *dummy, int flag) { buffered_logs = flag; - ap_log_set_writer_init(ap_buffered_log_writer_init); - ap_log_set_writer(ap_buffered_log_writer); + if (buffered_logs) { + ap_log_set_writer_init(ap_buffered_log_writer_init); + ap_log_set_writer(ap_buffered_log_writer); + } return NULL; } static const command_rec config_log_cmds[] = -- 2.50.1