From: Mark Andrews Date: Mon, 3 Jun 2002 04:34:19 +0000 (+0000) Subject: 1216. [bug] isc_log_closefilelogs() needed to lock the log X-Git-Tag: v9.0.1^2~8330 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=c61ec97ae0b859914ee26e213fe792f86a157990;p=thirdparty%2Fbind9.git 1216. [bug] isc_log_closefilelogs() needed to lock the log context. --- diff --git a/CHANGES b/CHANGES index 3af0afa9150..d7cde18038a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1216. [bug] isc_log_closefilelogs() needed to lock the log + context. + 1215. [bug] isc_log_setdebuglevel() needed to lock the log context. diff --git a/lib/isc/log.c b/lib/isc/log.c index 9a53aa22c66..799facd8c54 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.c,v 1.75 2002/06/03 03:39:56 marka Exp $ */ +/* $Id: log.c,v 1.76 2002/06/03 04:34:19 marka Exp $ */ /* Principal Authors: DCL */ @@ -1020,6 +1020,7 @@ isc_log_closefilelogs(isc_log_t *lctx) { REQUIRE(VALID_CONTEXT(lctx)); + LOCK(&lctx->lock); for (channel = ISC_LIST_HEAD(lctx->logconfig->channels); channel != NULL; channel = ISC_LIST_NEXT(channel, link)) @@ -1029,6 +1030,7 @@ isc_log_closefilelogs(isc_log_t *lctx) { (void)fclose(FILE_STREAM(channel)); FILE_STREAM(channel) = NULL; } + UNLOCK(&lctx->lock); } /****