]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Allow *_log_setcontext() to be called multiple times, so that *_lctx
authorBrian Wellington <source@isc.org>
Tue, 26 Sep 2000 22:10:44 +0000 (22:10 +0000)
committerBrian Wellington <source@isc.org>
Tue, 26 Sep 2000 22:10:44 +0000 (22:10 +0000)
can be set to NULL once the log context has been freed.

lib/dns/log.c
lib/isc/log.c

index b79051f6a9c92cbce76154a61f7f3c11a2676965..749771b8647e613fe36e4f428317fdceafc460b6 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: log.c,v 1.26 2000/08/01 01:22:28 tale Exp $ */
+/* $Id: log.c,v 1.27 2000/09/26 22:10:44 bwelling Exp $ */
 
 /* Principal Authors: DCL */
 
@@ -84,7 +84,5 @@ dns_log_init(isc_log_t *lctx) {
 
 void
 dns_log_setcontext(isc_log_t *lctx) {
-       REQUIRE(dns_lctx == NULL);
-
        dns_lctx = lctx;
 }
index e92636fc175f7c20ce26332102ab5d5135025a4b..daf0c618080601b7c6a78334f01c2502d5904c09 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: log.c,v 1.46 2000/08/31 20:58:14 bwelling Exp $ */
+/* $Id: log.c,v 1.47 2000/09/26 22:10:22 bwelling Exp $ */
 
 /* Principal Authors: DCL */
 
@@ -853,8 +853,6 @@ isc_log_vwrite1(isc_log_t *lctx, isc_logcategory_t *category,
 
 void
 isc_log_setcontext(isc_log_t *lctx) {
-       REQUIRE(isc_lctx == NULL);
-
        isc_lctx = lctx;
 }
 
@@ -1218,7 +1216,7 @@ isc_log_wouldlog(isc_log_t *lctx, int level) {
         * dynamically changed.
         */
 
-       if (lctx == NULL)
+       if (lctx == NULL || lctx->logconfig == NULL)
                return (ISC_FALSE);
 
        return (ISC_TF(level <= lctx->logconfig->highest_level ||