2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

Clean up fetch_answered

After the changes in [GL #4447] the 'fetch_answered' variable is
always false now. Delete the unnecessary code.
This commit is contained in:
Aram Sargsyan 2024-02-19 16:15:07 +00:00
parent 366b93f835
commit 9e38d0e3af

View File

@ -6217,7 +6217,6 @@ fetch_callback(void *arg) {
ns_client_t *client = resp->arg; ns_client_t *client = resp->arg;
dns_fetch_t *fetch = NULL; dns_fetch_t *fetch = NULL;
bool fetch_canceled = false; bool fetch_canceled = false;
bool fetch_answered = false;
isc_logcategory_t *logcategory = NS_LOGCATEGORY_QUERY_ERRORS; isc_logcategory_t *logcategory = NS_LOGCATEGORY_QUERY_ERRORS;
isc_result_t result; isc_result_t result;
int errorloglevel; int errorloglevel;
@ -6288,7 +6287,7 @@ fetch_callback(void *arg) {
*/ */
qctx_init(client, &resp, 0, &qctx); qctx_init(client, &resp, 0, &qctx);
if (fetch_canceled || fetch_answered) { if (fetch_canceled) {
/* /*
* We've timed out or are shutting down. We can now * We've timed out or are shutting down. We can now
* free the event and other resources held by qctx, but * free the event and other resources held by qctx, but
@ -6298,14 +6297,10 @@ fetch_callback(void *arg) {
qctx_freedata(&qctx); qctx_freedata(&qctx);
/* /*
* Return an error to the client, or just drop. * Return an error to the client.
*/ */
if (fetch_canceled) { CTRACE(ISC_LOG_ERROR, "fetch cancelled");
CTRACE(ISC_LOG_ERROR, "fetch cancelled"); query_error(client, DNS_R_SERVFAIL, __LINE__);
query_error(client, DNS_R_SERVFAIL, __LINE__);
} else {
query_next(client, ISC_R_CANCELED);
}
/* /*
* Free any persistent plugin data that was allocated to * Free any persistent plugin data that was allocated to