]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Clean up fetch_answered
authorAram Sargsyan <aram@isc.org>
Mon, 19 Feb 2024 16:15:07 +0000 (16:15 +0000)
committerAram Sargsyan <aram@isc.org>
Tue, 20 Feb 2024 10:46:40 +0000 (10:46 +0000)
After the changes in [GL #4447] the 'fetch_answered' variable is
always false now. Delete the unnecessary code.

lib/ns/query.c

index 4bc57e04c0a69a7799d044140d7457227cabac7a..efe33a9dd9bf09570d0edb9605977248ab9af816 100644 (file)
@@ -6217,7 +6217,6 @@ fetch_callback(void *arg) {
        ns_client_t *client = resp->arg;
        dns_fetch_t *fetch = NULL;
        bool fetch_canceled = false;
-       bool fetch_answered = false;
        isc_logcategory_t *logcategory = NS_LOGCATEGORY_QUERY_ERRORS;
        isc_result_t result;
        int errorloglevel;
@@ -6288,7 +6287,7 @@ fetch_callback(void *arg) {
         */
        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
                 * free the event and other resources held by qctx, but
@@ -6298,14 +6297,10 @@ fetch_callback(void *arg) {
                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");
-                       query_error(client, DNS_R_SERVFAIL, __LINE__);
-               } else {
-                       query_next(client, ISC_R_CANCELED);
-               }
+               CTRACE(ISC_LOG_ERROR, "fetch cancelled");
+               query_error(client, DNS_R_SERVFAIL, __LINE__);
 
                /*
                 * Free any persistent plugin data that was allocated to