mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38: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. (cherry picked from commit b07ec4f0b3429f688d35d2694f56cffc9d3ac56b)
This commit is contained in:
parent
7b46d898b6
commit
0d1251a2ec
@ -13919,6 +13919,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;
|
||||
@ -13927,6 +13928,12 @@ refresh_callback(void *arg) {
|
||||
|
||||
ENTER;
|
||||
|
||||
if (isc_log_wouldlog(dns_lctx, 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);
|
||||
@ -13942,7 +13949,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:
|
||||
@ -13988,7 +13995,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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user