]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Asynchronous zone load events have no way of getting canceled
authorMichał Kępień <michal@isc.org>
Thu, 15 Feb 2018 19:31:53 +0000 (20:31 +0100)
committerMichał Kępień <michal@isc.org>
Fri, 16 Feb 2018 07:47:40 +0000 (08:47 +0100)
Code handling cancellation of asynchronous zone load events was likely
copied over from other functions when asynchronous zone loading was
first implemented in commit 8a2ab2b9203.  However, unlike those other
functions, asynchronous zone loading events currently have no way of
getting canceled once they get posted, which means the aforementioned
code is effectively dead.  Remove it to prevent confusion.

lib/dns/zone.c

index 183e11a8e80fa185d0cc2608de4c1931f3e51bb5..c4147d19af76a428a324325e367adc1ebd813cf9 100644 (file)
@@ -2168,20 +2168,15 @@ static void
 zone_asyncload(isc_task_t *task, isc_event_t *event) {
        dns_asyncload_t *asl = event->ev_arg;
        dns_zone_t *zone = asl->zone;
-       isc_result_t result = ISC_R_SUCCESS;
+       isc_result_t result;
        isc_boolean_t load_pending;
 
        UNUSED(task);
 
        REQUIRE(DNS_ZONE_VALID(zone));
 
-       if ((event->ev_attributes & ISC_EVENTATTR_CANCELED) != 0)
-               result = ISC_R_CANCELED;
        isc_event_free(&event);
 
-       if (result == ISC_R_CANCELED)
-               goto cleanup;
-
        /* Make sure load is still pending */
        LOCK_ZONE(zone);
        load_pending = ISC_TF(DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADPENDING));