Remove unused client->shutdown and client->shutdown_arg

While refactoring the lib/ns/xfrout.c, it was discovered that .shutdown
and .shutdown_arg members of ns_client_t structure are unused.

Remove the unused members and associated code that was using in it in
the ns_xfrout.
This commit is contained in:
Ondřej Surý
2022-02-08 21:32:37 +01:00
parent 3c7b04d015
commit 037549c405
2 changed files with 0 additions and 21 deletions

View File

@@ -198,8 +198,6 @@ struct ns_client {
int16_t ednsversion; /* -1 noedns */
uint16_t additionaldepth;
void (*cleanup)(ns_client_t *);
void (*shutdown)(void *arg, isc_result_t result);
void *shutdown_arg;
ns_query_t query;
isc_time_t requesttime;
isc_stdtime_t now;

View File

@@ -695,9 +695,6 @@ xfrout_maybe_destroy(xfrout_ctx_t *xfr);
static void
xfrout_ctx_destroy(xfrout_ctx_t **xfrp);
static void
xfrout_client_shutdown(void *arg, isc_result_t result);
static void
xfrout_log1(ns_client_t *client, dns_name_t *zonename, dns_rdataclass_t rdclass,
int level, const char *fmt, ...) ISC_FORMAT_PRINTF(5, 6);
@@ -1276,13 +1273,6 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
xfr->txmem = mem;
xfr->txmemlen = len;
/*
* Register a shutdown callback with the client, so that we
* can stop the transfer immediately when the client task
* gets a shutdown event.
*/
xfr->client->shutdown = xfrout_client_shutdown;
xfr->client->shutdown_arg = xfr;
/*
* These MUST be after the last "goto failure;" / CHECK to
* prevent a double free by the caller.
@@ -1632,9 +1622,6 @@ xfrout_ctx_destroy(xfrout_ctx_t **xfrp) {
INSIST(xfr->sends == 0);
xfr->client->shutdown = NULL;
xfr->client->shutdown_arg = NULL;
if (xfr->stream != NULL) {
xfr->stream->methods->destroy(&xfr->stream);
}
@@ -1739,12 +1726,6 @@ xfrout_maybe_destroy(xfrout_ctx_t *xfr) {
xfrout_ctx_destroy(&xfr);
}
static void
xfrout_client_shutdown(void *arg, isc_result_t result) {
xfrout_ctx_t *xfr = (xfrout_ctx_t *)arg;
xfrout_fail(xfr, result, "aborted");
}
/*
* Log outgoing zone transfer messages in a format like
* <client>: transfer of <zone>: <message>