From: hno <> Date: Sun, 20 May 2001 06:09:25 +0000 (+0000) Subject: Bugzilla bug 102: Close useragent log on shutdown X-Git-Tag: SQUID_3_0_PRE1~1508 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b8242358ff35d006cead81d14504835ccf5b75d;p=thirdparty%2Fsquid.git Bugzilla bug 102: Close useragent log on shutdown --- diff --git a/src/main.cc b/src/main.cc index 987e653aff..5c3ec5b109 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.338 2001/05/19 19:32:02 hno Exp $ + * $Id: main.cc,v 1.339 2001/05/20 00:09:25 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -956,6 +956,7 @@ SquidShutdown(void *unused) storeDirSync(); /* Flush log writes */ storeLogClose(); accessLogClose(); + useragentLogClose(); #if WIP_FWD_LOG fwdUninit(); #endif diff --git a/src/protos.h b/src/protos.h index 78ad5a001b..7a7863dfe9 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.405 2001/05/08 15:24:35 hno Exp $ + * $Id: protos.h,v 1.406 2001/05/20 00:09:25 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1109,6 +1109,7 @@ extern void urlExtMethodConfigure(void); extern void useragentOpenLog(void); extern void useragentRotateLog(void); extern void logUserAgent(const char *, const char *); +extern void useragentLogClose(void); extern void refererOpenLog(void); extern void refererRotateLog(void); extern void logReferer(const char *, const char *, const char *); diff --git a/src/useragent.cc b/src/useragent.cc index c6bcc7a364..bca728bfac 100644 --- a/src/useragent.cc +++ b/src/useragent.cc @@ -1,6 +1,6 @@ /* - * $Id: useragent.cc,v 1.24 2001/03/04 00:50:26 wessels Exp $ + * $Id: useragent.cc,v 1.25 2001/05/20 00:09:25 hno Exp $ * * DEBUG: section 40 User-Agent logging * AUTHOR: Joe Ramey @@ -82,3 +82,12 @@ logUserAgent(const char *client, const char *agent) agent); #endif } + +void +useragentLogClose(void) +{ +#if USE_USERAGENT_LOG + logfileClose(useragentlog); + useragentlog = NULL; +#endif +}