From: Mark Andrews Date: Mon, 3 Jun 2002 03:39:56 +0000 (+0000) Subject: 1215. [bug] isc_log_setdebuglevel() needed to lock the log X-Git-Tag: v9.0.1^2~8331 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=49f7d1585e0e4f1ffa1667391dd7ae1c4d3d4e81;p=thirdparty%2Fbind9.git 1215. [bug] isc_log_setdebuglevel() needed to lock the log context. --- diff --git a/CHANGES b/CHANGES index 20e30c22833..3af0afa9150 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1215. [bug] isc_log_setdebuglevel() needed to lock the log + context. + 1314. [func] libbind: no longer attempts bit string labels for IPv6 reverse resolution. Try IP6.ARPA then IP6.INT for nibble style resolution. diff --git a/lib/isc/log.c b/lib/isc/log.c index 666fae4995d..9a53aa22c66 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.74 2002/02/20 03:35:24 marka Exp $ */ +/* $Id: log.c,v 1.75 2002/06/03 03:39:56 marka Exp $ */ /* Principal Authors: DCL */ @@ -941,6 +941,8 @@ isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level) { REQUIRE(VALID_CONTEXT(lctx)); + LOCK(&lctx->lock); + lctx->debug_level = level; /* * Close ISC_LOG_DEBUGONLY channels if level is zero. @@ -955,6 +957,7 @@ isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level) { (void)fclose(FILE_STREAM(channel)); FILE_STREAM(channel) = NULL; } + UNLOCK(&lctx->lock); } unsigned int