]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
manually add dns_lctx to isc_log_write in ede.c
authorColin Vidal <colin@isc.org>
Thu, 30 Jan 2025 12:06:08 +0000 (13:06 +0100)
committerColin Vidal <colin@isc.org>
Thu, 30 Jan 2025 12:37:55 +0000 (12:37 +0000)
Because the new introduced code in main doesn't use the log context
anymore, manually add the log context for isc_log_write usages in the
new ede.c file.

lib/dns/ede.c

index 7fbbd8390501ab45607b3fc0627360441f1d4d37..4b6e7faad7d14037e3c11811e761808c26f5ea8c 100644 (file)
@@ -41,29 +41,32 @@ dns_ede_add(dns_edectx_t *edectx, uint16_t code, const char *text) {
        size_t textlen = 0;
 
        if (dns__ede_checkandupdateedeused(edectx, code)) {
-               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
-                             ISC_LOG_DEBUG(1), "ignoring duplicate ede %u %s",
-                             code, text == NULL ? "(null)" : text);
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(1),
+                             "ignoring duplicate ede %u %s", code,
+                             text == NULL ? "(null)" : text);
                return;
        }
 
        if (edectx->nextede >= DNS_EDE_MAX_ERRORS) {
-               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
-                             ISC_LOG_DEBUG(1), "too many ede, ignoring %u %s",
-                             code, text == NULL ? "(null)" : text);
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(1),
+                             "too many ede, ignoring %u %s", code,
+                             text == NULL ? "(null)" : text);
                return;
        }
        INSIST(edectx->ede[edectx->nextede] == NULL);
 
-       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
-                     ISC_LOG_DEBUG(1), "set ede: info-code %u extra-text %s",
-                     code, text == NULL ? "(null)" : text);
+       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(1),
+                     "set ede: info-code %u extra-text %s", code,
+                     text == NULL ? "(null)" : text);
 
        if (text != NULL) {
                textlen = strlen(text);
 
                if (textlen > DNS_EDE_EXTRATEXT_LEN) {
-                       isc_log_write(DNS_LOGCATEGORY_RESOLVER,
+                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(1),
                                      "truncate EDE code %hu text: %s", code,
                                      text);
@@ -147,7 +150,7 @@ dns_ede_copy(dns_edectx_t *edectx_to, const dns_edectx_t *edectx_from) {
                }
 
                if (edectx_to->nextede >= DNS_EDE_MAX_ERRORS) {
-                       isc_log_write(DNS_LOGCATEGORY_RESOLVER,
+                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(1),
                                      "too many ede from subfetch");
                        break;