2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Fix return value and docs for dns_zone_getxfr()

When the given zone is not associated with a zone manager, the function
currently returns ISC_R_NOTFOUND, which is documented as the return
value for the case in which no incoming zone transfer is found.  Make
the function return ISC_R_FAILURE in such a case instead.

Also update the description of the function as the value it returns is
not meant to indicate whether an ongoing incoming transfer for the given
zone exists.  The boolean variables that the function sets via the
pointers provided as its parameters, combined with either keeping
'*xfrp' set to NULL or updating it to a valid pointer, can be used by
the caller to infer all the necessary information.
This commit is contained in:
Aram Sargsyan
2023-09-25 12:33:29 +00:00
parent f1f863dd81
commit f9bcabff24
2 changed files with 3 additions and 4 deletions

View File

@@ -1856,9 +1856,8 @@ dns_zone_getxfr(dns_zone_t *zone, dns_xfrin_t **xfrp, bool *is_running,
*\li 'needs_refresh' to be non NULL.
*
* Returns:
* ISC_R_SUCCESS xfrin exists and the information was returned.
* ISC_R_NOTFOUND no xfrin was found for the zone.
* ISC_R_FAILED error while trying to get the xfrin information
* ISC_R_SUCCESS transfer information is returned
* ISC_R_FAILURE error while trying to get the transfer information
*/
void

View File

@@ -19293,7 +19293,7 @@ dns_zone_getxfr(dns_zone_t *zone, dns_xfrin_t **xfrp, bool *is_running,
REQUIRE(xfrp != NULL && *xfrp == NULL);
if (zone->zmgr == NULL) {
return (ISC_R_NOTFOUND);
return (ISC_R_FAILURE);
}
/* Reset. */