mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-28 17:46:40 -04:00
276. [bug] isc_log_categorybyname() and isc_log_modulebyname()
would fail to find the first member of any category
or module array apart from the internal defaults.
Thus, for example, the "notify" category was improperly
configured by named.
This resolves RT #132, "Logging channels definition problems."
This commit is contained in:
parent
42c6a8c74a
commit
c244584cad
2 changed files with 22 additions and 8 deletions
6
CHANGES
6
CHANGES
|
|
@ -1,3 +1,9 @@
|
|||
277. [bug] isc_log_categorybyname() and isc_log_modulebyname()
|
||||
would fail to find the first member of any category
|
||||
or module array apart from the internal defaults.
|
||||
Thus, for example, the "notify" category was improperly
|
||||
configured by named.
|
||||
|
||||
276. [bug] dig now supports maximum sized TCP messages.
|
||||
|
||||
275. [bug] The definition of lwres_gai_strerror() was missing
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.c,v 1.37 2000/06/02 18:15:45 bwelling Exp $ */
|
||||
/* $Id: log.c,v 1.38 2000/06/23 17:52:20 tale Exp $ */
|
||||
|
||||
/* Principal Authors: DCL */
|
||||
|
||||
|
|
@ -557,13 +557,15 @@ isc_log_registercategories(isc_log_t *lctx, isc_logcategory_t categories[]) {
|
|||
* Adjust the last (NULL) pointer of the already registered
|
||||
* categories to point to the incoming array.
|
||||
*/
|
||||
for (catp = lctx->categories; catp->name != NULL; catp++)
|
||||
for (catp = lctx->categories; catp->name != NULL; )
|
||||
if (catp->id == UINT_MAX)
|
||||
/*
|
||||
* The name pointer points to the next array.
|
||||
* Ick.
|
||||
*/
|
||||
DE_CONST(catp->name, catp);
|
||||
else
|
||||
catp++;
|
||||
|
||||
catp->name = (void *)categories;
|
||||
catp->id = UINT_MAX;
|
||||
|
|
@ -583,16 +585,18 @@ isc_log_categorybyname(isc_log_t *lctx, const char *name) {
|
|||
REQUIRE(VALID_CONTEXT(lctx));
|
||||
REQUIRE(name != NULL);
|
||||
|
||||
for (catp = lctx->categories; catp->name != NULL; catp++)
|
||||
for (catp = lctx->categories; catp->name != NULL; )
|
||||
if (catp->id == UINT_MAX)
|
||||
/*
|
||||
* catp is neither modified nor returned to the
|
||||
* caller, so removing its const qualifier is ok.
|
||||
*/
|
||||
DE_CONST(catp->name, catp);
|
||||
else
|
||||
else {
|
||||
if (strcmp(catp->name, name) == 0)
|
||||
return (catp);
|
||||
catp++;
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
|
@ -620,13 +624,15 @@ isc_log_registermodules(isc_log_t *lctx, isc_logmodule_t modules[]) {
|
|||
* Adjust the last (NULL) pointer of the already registered
|
||||
* modules to point to the incoming array.
|
||||
*/
|
||||
for (modp = lctx->modules; modp->name != NULL; modp++)
|
||||
for (modp = lctx->modules; modp->name != NULL; )
|
||||
if (modp->id == UINT_MAX)
|
||||
/*
|
||||
* The name pointer points to the next array.
|
||||
* Ick.
|
||||
*/
|
||||
DE_CONST(modp->name, modp);
|
||||
else
|
||||
modp++;
|
||||
|
||||
modp->name = (void *)modules;
|
||||
modp->id = UINT_MAX;
|
||||
|
|
@ -646,16 +652,18 @@ isc_log_modulebyname(isc_log_t *lctx, const char *name) {
|
|||
REQUIRE(VALID_CONTEXT(lctx));
|
||||
REQUIRE(name != NULL);
|
||||
|
||||
for (modp = lctx->modules; modp->name != NULL; modp++)
|
||||
for (modp = lctx->modules; modp->name != NULL; )
|
||||
if (modp->id == UINT_MAX)
|
||||
/*
|
||||
* catp is neither modified nor returned to the
|
||||
* modp is neither modified nor returned to the
|
||||
* caller, so removing its const qualifier is ok.
|
||||
*/
|
||||
DE_CONST(modp->name, modp);
|
||||
else
|
||||
else {
|
||||
if (strcmp(modp->name, name) == 0)
|
||||
return (modp);
|
||||
modp++;
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue