From: David Reid Date: Tue, 8 Jan 2002 17:07:19 +0000 (+0000) Subject: Restore the apr_pool_clear calls to main.c in case we have X-Git-Tag: 2.0.30~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bee20f42916de82bf38eb69a2fb41b0447143b5b;p=apache Restore the apr_pool_clear calls to main.c in case we have third-parties who are overriding the open_logs hook, in which case they'd miss the plog being cleared. Submitted by: Justin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92771 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 09f5d8f9a2..a823de6352 100644 --- a/server/core.c +++ b/server/core.c @@ -3361,7 +3361,6 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte static int core_open_logs(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { - apr_pool_clear(plog); ap_open_logs(s, plog); return OK; } diff --git a/server/main.c b/server/main.c index dd6cf0b50b..a024ea229d 100644 --- a/server/main.c +++ b/server/main.c @@ -411,6 +411,7 @@ int main(int argc, const char * const argv[]) ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "Syntax OK\n"); destroy_and_exit_process(process, 0); } + apr_pool_clear(plog); if ( ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) { ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, 0, NULL, "Unable to open logs\n"); destroy_and_exit_process(process, 1); @@ -442,6 +443,7 @@ int main(int argc, const char * const argv[]) ap_fixup_virtual_hosts(pconf, server_conf); ap_fini_vhost_config(pconf, server_conf); apr_sort_hooks(); + apr_pool_clear(plog); if ( ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) { ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, 0, NULL, "Unable to open logs\n"); destroy_and_exit_process(process, 1);