mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Add a debug log in zone.c:refresh_callback()
The new debug message logs the request result in the SOA request callback function.
This commit is contained in:
committed by
Ondřej Surý
parent
228e441328
commit
b07ec4f0b3
@@ -13894,6 +13894,7 @@ refresh_callback(void *arg) {
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_rdata_soa_t soa;
|
||||
isc_result_t result;
|
||||
const isc_result_t eresult = dns_request_getresult(request);
|
||||
isc_sockaddr_t curraddr;
|
||||
uint32_t serial, oldserial = 0;
|
||||
bool do_queue_xfrin = false;
|
||||
@@ -13902,6 +13903,12 @@ refresh_callback(void *arg) {
|
||||
|
||||
ENTER;
|
||||
|
||||
if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
|
||||
dns_zone_logc(zone, DNS_LOGCATEGORY_XFER_IN, ISC_LOG_DEBUG(3),
|
||||
"refresh: request result: %s",
|
||||
isc_result_totext(eresult));
|
||||
}
|
||||
|
||||
now = isc_time_now();
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
@@ -13917,7 +13924,7 @@ refresh_callback(void *arg) {
|
||||
isc_sockaddr_format(&curraddr, primary, sizeof(primary));
|
||||
isc_sockaddr_format(&zone->sourceaddr, source, sizeof(source));
|
||||
|
||||
switch (dns_request_getresult(request)) {
|
||||
switch (eresult) {
|
||||
case ISC_R_SUCCESS:
|
||||
break;
|
||||
case ISC_R_SHUTTINGDOWN:
|
||||
@@ -13963,7 +13970,7 @@ refresh_callback(void *arg) {
|
||||
}
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
result = dns_request_getresult(request);
|
||||
result = eresult;
|
||||
dns_zone_logc(zone, DNS_LOGCATEGORY_XFER_IN, ISC_LOG_INFO,
|
||||
"refresh: failure trying primary "
|
||||
"%s (source %s): %s",
|
||||
|
Reference in New Issue
Block a user