From: Evan Hunt Date: Mon, 21 Nov 2022 06:02:38 +0000 (-0800) Subject: remove unused 'nupdates' field from client X-Git-Tag: v9.19.8~46^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18606f527664fbb83d6bae13fbfd8228e1c3f8d5;p=thirdparty%2Fbind9.git remove unused 'nupdates' field from client the 'nupdates' field was originally used to track whether a client was ready to shut down, along with other similar counters nreads, nrecvs, naccepts and nsends. this is now tracked differently, but nupdates was overlooked when the other counters were removed. --- diff --git a/lib/ns/client.c b/lib/ns/client.c index 4c1f90801bf..9bf472911f3 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -219,7 +219,6 @@ ns_client_extendederror(ns_client_t *client, uint16_t code, const char *text) { static void ns_client_endrequest(ns_client_t *client) { - INSIST(client->nupdates == 0); INSIST(client->state == NS_CLIENTSTATE_WORKING || client->state == NS_CLIENTSTATE_RECURSING); diff --git a/lib/ns/include/ns/client.h b/lib/ns/include/ns/client.h index 3298322e593..47b72685025 100644 --- a/lib/ns/include/ns/client.h +++ b/lib/ns/include/ns/client.h @@ -165,7 +165,6 @@ struct ns_client { unsigned int magic; ns_clientmgr_t *manager; ns_clientstate_t state; - int nupdates; bool nodetach; unsigned int attributes; dns_view_t *view; diff --git a/lib/ns/update.c b/lib/ns/update.c index 274f4379640..dfa9be18ee0 100644 --- a/lib/ns/update.c +++ b/lib/ns/update.c @@ -1646,8 +1646,6 @@ send_update_event(ns_client_t *client, dns_zone_t *zone) { event->zone = zone; event->result = ISC_R_SUCCESS; - INSIST(client->nupdates == 0); - client->nupdates++; event->ev_arg = client; isc_nmhandle_attach(client->handle, &client->updatehandle); @@ -3545,7 +3543,6 @@ updatedone_action(isc_task_t *task, isc_event_t *event) { REQUIRE(task == client->manager->task); REQUIRE(client->updatehandle == client->handle); - INSIST(client->nupdates > 0); switch (uev->result) { case ISC_R_SUCCESS: inc_stats(client, uev->zone, ns_statscounter_updatedone); @@ -3561,8 +3558,6 @@ updatedone_action(isc_task_t *task, isc_event_t *event) { dns_zone_detach(&uev->zone); } - client->nupdates--; - respond(client, uev->result); isc_event_free(&event); @@ -3578,8 +3573,6 @@ forward_fail(isc_task_t *task, isc_event_t *event) { UNUSED(task); - INSIST(client->nupdates > 0); - client->nupdates--; respond(client, DNS_R_SERVFAIL); isc_event_free(&event); isc_nmhandle_detach(&client->updatehandle); @@ -3614,8 +3607,6 @@ forward_done(isc_task_t *task, isc_event_t *event) { UNUSED(task); - INSIST(client->nupdates > 0); - client->nupdates--; ns_client_sendraw(client, uev->answer); dns_message_detach(&uev->answer); isc_event_free(&event); @@ -3659,8 +3650,6 @@ send_forward_event(ns_client_t *client, dns_zone_t *zone) { event->zone = zone; event->result = ISC_R_SUCCESS; - INSIST(client->nupdates == 0); - client->nupdates++; event->ev_arg = client; dns_name_format(dns_zone_getorigin(zone), namebuf, sizeof(namebuf));