From: wessels <> Date: Tue, 16 Apr 1996 00:01:19 +0000 (+0000) Subject: make _db_init() re-callable X-Git-Tag: SQUID_3_0_PRE1~6173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a8020d1bc766afb52a1e2a79fa73282ef7d907a;p=thirdparty%2Fsquid.git make _db_init() re-callable --- diff --git a/src/debug.cc b/src/debug.cc index e3000a4c31..102b3abdd6 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1,5 +1,5 @@ -/* $Id: debug.cc,v 1.13 1996/04/14 03:06:33 wessels Exp $ */ +/* $Id: debug.cc,v 1.14 1996/04/15 18:01:19 wessels Exp $ */ #include "squid.h" @@ -112,6 +112,8 @@ static void debugOpenLog(logfile) if (debug_log_file) xfree(debug_log_file); debug_log_file = xstrdup(logfile); /* keep a static copy */ + if (debug_log) + fclose(debug_log); debug_log = fopen(logfile, "a+"); if (!debug_log) { fprintf(stderr, "WARNING: Cannot write log file: %s\n", logfile); @@ -171,8 +173,6 @@ void _db_rotate_log() } /* Close and reopen the log. It may have been renamed "manually" * before HUP'ing us. */ - if (debug_log != stderr) { - fclose(debug_log); + if (debug_log != stderr) debugOpenLog(debug_log_file); - } }