]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1215. [bug] isc_log_setdebuglevel() needed to lock the log
authorMark Andrews <marka@isc.org>
Mon, 3 Jun 2002 03:39:56 +0000 (03:39 +0000)
committerMark Andrews <marka@isc.org>
Mon, 3 Jun 2002 03:39:56 +0000 (03:39 +0000)
                        context.

CHANGES
lib/isc/log.c

diff --git a/CHANGES b/CHANGES
index 20e30c228333ae80d2ab5b1e03a1827ed6f69bab..3af0afa9150a8383bcc3376e4ba54bd18ee0a1c3 100644 (file)
--- 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.
index 666fae4995dd26d15c2c5d5b38cb4fe28c8c597f..9a53aa22c6643f6c466aed83ea85e664348296b7 100644 (file)
@@ -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