From cc8e8b59d6780889739657226a95e23ca1ecadb1 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Wed, 31 Oct 2001 17:42:04 +0000 Subject: [PATCH] 1082. [bug] The -g option to named incorrectly caused logging to be sent to syslog in addition to stderr. --- CHANGES | 3 +++ bin/named/log.c | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 3efb482903..c18f6b4ce2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1082. [bug] The -g option to named incorrectly caused logging + to be sent to syslog in addition to stderr. + 1081. [bug] Multicast queries were incorrectly identified based on the source address, not the destination address. diff --git a/bin/named/log.c b/bin/named/log.c index d171666a92..9509ddcd67 100644 --- a/bin/named/log.c +++ b/bin/named/log.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.c,v 1.33 2001/06/14 14:14:17 gson Exp $ */ +/* $Id: log.c,v 1.34 2001/10/31 17:42:04 gson Exp $ */ #include @@ -168,10 +168,12 @@ isc_result_t ns_log_setdefaultcategory(isc_logconfig_t *lcfg) { isc_result_t result; - result = isc_log_usechannel(lcfg, "default_syslog", - ISC_LOGCATEGORY_DEFAULT, NULL); - if (result != ISC_R_SUCCESS) - goto cleanup; + if (! ns_g_logstderr) { + result = isc_log_usechannel(lcfg, "default_syslog", + ISC_LOGCATEGORY_DEFAULT, NULL); + if (result != ISC_R_SUCCESS) + goto cleanup; + } result = isc_log_usechannel(lcfg, "default_debug", ISC_LOGCATEGORY_DEFAULT, NULL);