]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1216. [bug] isc_log_closefilelogs() needed to lock the log
authorMark Andrews <marka@isc.org>
Mon, 3 Jun 2002 04:34:19 +0000 (04:34 +0000)
committerMark Andrews <marka@isc.org>
Mon, 3 Jun 2002 04:34:19 +0000 (04:34 +0000)
                        context.

CHANGES
lib/isc/log.c

diff --git a/CHANGES b/CHANGES
index 3af0afa9150a8383bcc3376e4ba54bd18ee0a1c3..d7cde18038ab04976ca2f50fa67814da857a5350 100644 (file)
--- 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.
 
index 9a53aa22c6643f6c466aed83ea85e664348296b7..799facd8c544266df506a582b94f3dad2a2d7945 100644 (file)
@@ -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);
 }
 
 /****