mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 13:08:06 +00:00
Allow *_log_setcontext() to be called multiple times, so that *_lctx
can be set to NULL once the log context has been freed.
This commit is contained in:
parent
3a62e221b4
commit
df03463a37
@ -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;
|
||||
}
|
||||
|
@ -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 ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user