Commit 8a0ff6c1 authored by Mark Andrews's avatar Mark Andrews
Browse files

576. [doc] isc_log_create() description did not match reality.

 575.   [bug]           isc_log_create() was not setting internal state
                        correctly to reflect the default channels created.
parent 0f9bbc9e
576. [doc] isc_log_create() description did not match reality.
575. [bug] isc_log_create() was not setting internal state
correctly to reflect the default channels created.
574. [bug] TSIG signed queries sent by the resolver would fail to 574. [bug] TSIG signed queries sent by the resolver would fail to
have their responses validated and would leak memory. have their responses validated and would leak memory.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: log.h,v 1.29 2000/09/26 22:14:35 bwelling Exp $ */ /* $Id: log.h,v 1.30 2000/11/24 01:37:26 marka Exp $ */
#ifndef ISC_LOG_H #ifndef ISC_LOG_H
#define ISC_LOG_H 1 #define ISC_LOG_H 1
...@@ -152,7 +152,7 @@ isc_log_create(isc_mem_t *mctx, isc_log_t **lctxp, isc_logconfig_t **lcfgp); ...@@ -152,7 +152,7 @@ isc_log_create(isc_mem_t *mctx, isc_log_t **lctxp, isc_logconfig_t **lcfgp);
* Requires: * Requires:
* mctx is a valid memory context. * mctx is a valid memory context.
* lctxp is not null and *lctxp is null. * lctxp is not null and *lctxp is null.
* lctfg is not null and *lcfgp is null. * lctfg is null or lctfg is not null and *lcfgp is null.
* *
* Ensures: * Ensures:
* *lctxp will point to a valid logging context if all of the necessary * *lctxp will point to a valid logging context if all of the necessary
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: log.c,v 1.48 2000/10/20 02:21:55 marka Exp $ */ /* $Id: log.c,v 1.49 2000/11/24 01:37:24 marka Exp $ */
/* Principal Authors: DCL */ /* Principal Authors: DCL */
...@@ -252,6 +252,7 @@ isc_log_create(isc_mem_t *mctx, isc_log_t **lctxp, isc_logconfig_t **lcfgp) { ...@@ -252,6 +252,7 @@ isc_log_create(isc_mem_t *mctx, isc_log_t **lctxp, isc_logconfig_t **lcfgp) {
REQUIRE(mctx != NULL); REQUIRE(mctx != NULL);
REQUIRE(lctxp != NULL && *lctxp == NULL); REQUIRE(lctxp != NULL && *lctxp == NULL);
REQUIRE(lcfgp == NULL || *lcfgp == NULL);
lctx = isc_mem_get(mctx, sizeof(*lctx)); lctx = isc_mem_get(mctx, sizeof(*lctx));
if (lctx != NULL) { if (lctx != NULL) {
...@@ -304,6 +305,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) { ...@@ -304,6 +305,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) {
isc_logconfig_t *lcfg; isc_logconfig_t *lcfg;
isc_logdestination_t destination; isc_logdestination_t destination;
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
int level = ISC_LOG_INFO;
REQUIRE(lcfgp != NULL && *lcfgp == NULL); REQUIRE(lcfgp != NULL && *lcfgp == NULL);
REQUIRE(VALID_CONTEXT(lctx)); REQUIRE(VALID_CONTEXT(lctx));
...@@ -315,7 +317,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) { ...@@ -315,7 +317,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) {
lcfg->channellists = NULL; lcfg->channellists = NULL;
lcfg->channellist_count = 0; lcfg->channellist_count = 0;
lcfg->duplicate_interval = 0; lcfg->duplicate_interval = 0;
lcfg->highest_level = ISC_LOG_CRITICAL; lcfg->highest_level = level;
lcfg->tag = NULL; lcfg->tag = NULL;
lcfg->dynamic = ISC_FALSE; lcfg->dynamic = ISC_FALSE;
...@@ -339,7 +341,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) { ...@@ -339,7 +341,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) {
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
destination.facility = LOG_DAEMON; destination.facility = LOG_DAEMON;
result = isc_log_createchannel(lcfg, "default_syslog", result = isc_log_createchannel(lcfg, "default_syslog",
ISC_LOG_TOSYSLOG, ISC_LOG_INFO, ISC_LOG_TOSYSLOG, level,
&destination, 0); &destination, 0);
} }
...@@ -350,7 +352,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) { ...@@ -350,7 +352,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) {
destination.file.maximum_size = 0; destination.file.maximum_size = 0;
result = isc_log_createchannel(lcfg, "default_stderr", result = isc_log_createchannel(lcfg, "default_stderr",
ISC_LOG_TOFILEDESC, ISC_LOG_TOFILEDESC,
ISC_LOG_INFO, level,
&destination, &destination,
ISC_LOG_PRINTTIME); ISC_LOG_PRINTTIME);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment