]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Rename private zone functions
authorMatthijs Mekking <matthijs@isc.org>
Thu, 19 Mar 2026 16:29:55 +0000 (17:29 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 8 Apr 2026 12:24:17 +0000 (14:24 +0200)
Rename functions that are defined in the private header file to start
with 'dns__zone_'.

lib/dns/zone.c
lib/dns/zone_p.h
lib/dns/zonemgr.c

index 27c5ffcf067579cbbe89fd7247fa82f7251cbda0..ae4d77d09ca3e0eec65e5773401c25f866816538 100644 (file)
@@ -10813,7 +10813,7 @@ checkds_cancel(dns_zone_t *zone) {
 }
 
 void
-forward_cancel(dns_zone_t *zone) {
+dns__zone_forward_cancel(dns_zone_t *zone) {
        /*
         * 'zone' locked by caller.
         */
@@ -13021,16 +13021,16 @@ zone_shutdown(void *arg) {
                        ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone,
                                        statelink);
                        zone->statelist = NULL;
-                       zmgr_resume_xfrs(zone->zmgr, false);
+                       dns__zonemgr_resume_xfrs(zone->zmgr, false);
                }
                RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
        }
 
        /*
-        * In loop context, no locking required.  See zone_xfrdone().
+        * In loop context, no locking required.  See dns__zone_xfrdone().
         */
        if (zone->xfr != NULL) {
-               /* The final detach will happen in zone_xfrdone() */
+               /* The final detach will happen in dns__zone_xfrdone() */
                dns_xfrin_shutdown(zone->xfr);
        }
 
@@ -13079,7 +13079,7 @@ zone_shutdown(void *arg) {
        dns_notify_cancel(&zone->notifysoa);
        dns_notify_cancel(&zone->notifycds);
 
-       forward_cancel(zone);
+       dns__zone_forward_cancel(zone);
 
        if (zone->timer != NULL) {
                isc_refcount_decrement(&zone->irefs);
@@ -15262,7 +15262,7 @@ zone_detachdb(dns_zone_t *zone) {
 }
 
 void
-zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result) {
+dns__zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result) {
        isc_time_t now, expiretime;
        bool again = false;
        unsigned int soacount;
@@ -15558,7 +15558,7 @@ again:
                RWLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
                ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone, statelink);
                zone->statelist = NULL;
-               zmgr_resume_xfrs(zone->zmgr, false);
+               dns__zonemgr_resume_xfrs(zone->zmgr, false);
                RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
                LOCK_ZONE(zone);
        }
@@ -15664,7 +15664,7 @@ queue_xfrin(dns_zone_t *zone) {
        ISC_LIST_APPEND(zmgr->waiting_for_xfrin, zone, statelink);
        isc_refcount_increment0(&zone->irefs);
        zone->statelist = &zmgr->waiting_for_xfrin;
-       result = zmgr_start_xfrin_ifquota(zmgr, zone);
+       result = dns__zonemgr_start_xfrin_ifquota(zmgr, zone);
        RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
 
        if (result == ISC_R_QUOTA) {
index 65583aef9462879123cf405e0b93467cc8084ca1..f7428c3a240da423fa040db58b12cef05b3524bf 100644 (file)
@@ -861,7 +861,7 @@ dns__zone_set_resigntime(dns_zone_t *zone);
  */
 
 void
-forward_cancel(dns_zone_t *zone);
+dns__zone_forward_cancel(dns_zone_t *zone);
 /*%<
  *     Cancel forwarding.
  *
@@ -871,7 +871,7 @@ forward_cancel(dns_zone_t *zone);
  */
 
 void
-zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result);
+dns__zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result);
 /*%<
  *     Process a finished zone transfer.
  *
@@ -881,7 +881,7 @@ zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result);
  */
 
 isc_result_t
-zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone);
+dns__zonemgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone);
 /*%<
  *     Try to start an incoming zone transfer for 'zone', quota permitting.
  *
@@ -899,7 +899,7 @@ zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone);
  */
 
 void
-zmgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi);
+dns__zonemgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi);
 /*%<
  *     Try to start a new incoming zone transfer to fill a quota
  *     slot that was just vacated.
index dd26f3346900c50dde8f4580639497dfbb3b869c..ede9d28503a43f4db32980036d01a6ca4946e323 100644 (file)
@@ -241,7 +241,7 @@ dns_zonemgr_forcemaint(dns_zonemgr_t *zmgr) {
         * possible.
         */
        RWLOCK(&zmgr->rwlock, isc_rwlocktype_write);
-       zmgr_resume_xfrs(zmgr, true);
+       dns__zonemgr_resume_xfrs(zmgr, true);
        RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
        return ISC_R_SUCCESS;
 }
@@ -263,7 +263,7 @@ dns_zonemgr_shutdown(dns_zonemgr_t *zmgr) {
        RWLOCK(&zmgr->rwlock, isc_rwlocktype_read);
        ISC_LIST_FOREACH(zmgr->zones, zone, link) {
                LOCK_ZONE(zone);
-               forward_cancel(zone);
+               dns__zone_forward_cancel(zone);
                UNLOCK_ZONE(zone);
        }
        RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_read);
@@ -330,10 +330,10 @@ dns_zonemgr_gettransfersperns(dns_zonemgr_t *zmgr) {
  *     The zone manager is locked by the caller.
  */
 void
-zmgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi) {
+dns__zonemgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi) {
        ISC_LIST_FOREACH(zmgr->waiting_for_xfrin, zone, statelink) {
                isc_result_t result;
-               result = zmgr_start_xfrin_ifquota(zmgr, zone);
+               result = dns__zonemgr_start_xfrin_ifquota(zmgr, zone);
                if (result == ISC_R_SUCCESS) {
                        if (multi) {
                                continue;
@@ -384,7 +384,7 @@ got_transfer_quota(void *arg) {
        dns_xfrin_t *xfr = NULL;
 
        if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) {
-               zone_xfrdone(zone, NULL, ISC_R_CANCELED);
+               dns__zone_xfrdone(zone, NULL, ISC_R_CANCELED);
                return;
        }
 
@@ -398,7 +398,7 @@ got_transfer_quota(void *arg) {
                              "got_transfer_quota: skipping zone transfer as "
                              "primary %s (source %s) is unreachable (cached)",
                              primary, source);
-               zone_xfrdone(zone, NULL, ISC_R_CANCELED);
+               dns__zone_xfrdone(zone, NULL, ISC_R_CANCELED);
                return;
        }
 
@@ -553,9 +553,9 @@ got_transfer_quota(void *arg) {
         * zone transfer.  This ensures that we get removed from
         * zmgr->xfrin_in_progress.
         */
-       result = dns_xfrin_start(zone->xfr, zone_xfrdone);
+       result = dns_xfrin_start(zone->xfr, dns__zone_xfrdone);
        if (result != ISC_R_SUCCESS) {
-               zone_xfrdone(zone, NULL, result);
+               dns__zone_xfrdone(zone, NULL, result);
                return;
        }
 
@@ -588,13 +588,13 @@ got_transfer_quota(void *arg) {
  *
  * Returns:
  *     ISC_R_SUCCESS   There was enough quota and we attempted to
- *                     start a transfer.  zone_xfrdone() has been or will
+ *                     start a transfer.  dns__zone_xfrdone() has been or will
  *                     be called.
  *     ISC_R_QUOTA     Not enough quota.
  *     Others          Failure.
  */
 isc_result_t
-zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone) {
+dns__zonemgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone) {
        dns_peer_t *peer = NULL;
        isc_netaddr_t primaryip;
        isc_sockaddr_t curraddr;