]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove qname/qtype from dns_adb_createfind() call
authorOndřej Surý <ondrej@isc.org>
Sun, 31 Aug 2025 17:34:35 +0000 (19:34 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 2 Sep 2025 18:16:58 +0000 (20:16 +0200)
Both qname and qtype arguments to dns_adb_createfind() were unused.
Remove both these arguments from the function prototype.

lib/dns/adb.c
lib/dns/include/dns/adb.h
lib/dns/resolver.c
lib/dns/zone.c

index 0680d7746682c8ff12dab90aa3131dcdbfbf0f90..2c2c7ba6777ce5a34a4a515682612d9aac0c785a 100644 (file)
@@ -1715,8 +1715,7 @@ dns_adb_shutdown(dns_adb_t *adb) {
  */
 isc_result_t
 dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg,
-                  const dns_name_t *name, const dns_name_t *qname,
-                  dns_rdatatype_t qtype ISC_ATTR_UNUSED, unsigned int options,
+                  const dns_name_t *name, unsigned int options,
                   isc_stdtime_t now, in_port_t port, unsigned int depth,
                   isc_counter_t *qc, isc_counter_t *gqc,
                   dns_adbfind_t **findp) {
@@ -1737,7 +1736,6 @@ dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg,
                REQUIRE(cb != NULL);
        }
        REQUIRE(name != NULL);
-       REQUIRE(qname != NULL);
        REQUIRE(findp != NULL && *findp == NULL);
 
        REQUIRE((options & DNS_ADBFIND_ADDRESSMASK) != 0);
@@ -2949,8 +2947,6 @@ maybe_adjust_quota(dns_adb_t *adb, dns_adbaddrinfo_t *addr, bool timeout) {
        }
 }
 
-#define EDNSTOS 3U
-
 void
 dns_adb_plainresponse(dns_adb_t *adb, dns_adbaddrinfo_t *addr) {
        REQUIRE(DNS_ADB_VALID(adb));
index 37df390ba6ddf5679979d80a5a60287ba50e10fb..4c0207f8428e44ac2340a637c53d8ff85a1fa49d 100644 (file)
@@ -276,8 +276,7 @@ dns_adb_shutdown(dns_adb_t *adb);
 
 isc_result_t
 dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg,
-                  const dns_name_t *name, const dns_name_t *qname,
-                  dns_rdatatype_t qtype, unsigned int options,
+                  const dns_name_t *name, unsigned int options,
                   isc_stdtime_t now, in_port_t port, unsigned int depth,
                   isc_counter_t *qc, isc_counter_t *gqc, dns_adbfind_t **find);
 /*%<
@@ -325,8 +324,6 @@ dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg,
  *
  *\li  *name is a valid dns_name_t.
  *
- *\li  qname != NULL and *qname be a valid dns_name_t.
- *
  *\li  find != NULL && *find == NULL.
  *
  * Returns:
@@ -372,16 +369,6 @@ dns_adb_cancelfind(dns_adbfind_t *find);
  *\li  The event was posted to the task.
  */
 
-void
-dns_adbfind_done(dns_adbfind_t find);
-/*%<
- * Marks a find as ready to free.
- *
- * Requires:
- *
- *\li  'find' != NULL and *find be valid dns_adbfind_t pointer.
- */
-
 unsigned int
 dns_adb_findstatus(dns_adbfind_t *);
 /*%<
index 69424f4a8929a1a0573c7e26f3bcb7b5cc1b0bce..26204bde1007559e908e21d2d4979573dcb23847 100644 (file)
@@ -3222,9 +3222,9 @@ findname(fetchctx_t *fctx, const dns_name_t *name, in_port_t port,
        INSIST(!SHUTTINGDOWN(fctx));
        fetchctx_ref(fctx);
        result = dns_adb_createfind(fctx->adb, fctx->loop, fctx_finddone, fctx,
-                                   name, fctx->name, fctx->type, options, now,
-                                   res->view->dstport, fctx->depth + 1,
-                                   fctx->qc, fctx->gqc, &find);
+                                   name, options, now, res->view->dstport,
+                                   fctx->depth + 1, fctx->qc, fctx->gqc,
+                                   &find);
 
        isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
                      ISC_LOG_DEBUG(3), "fctx %p(%s): createfind for %s - %s",
index 8ffaeb7982e9ba0e00d3d931294e00025f0211ec..a25aeb8967537b3c10722fb90000e7fd04c8e0cb 100644 (file)
@@ -12772,8 +12772,8 @@ notify_find_address(dns_notify_t *notify) {
 
        result = dns_adb_createfind(
                adb, notify->zone->loop, process_notify_adb_event, notify,
-               &notify->ns, dns_rootname, 0, options, 0,
-               notify->zone->view->dstport, 0, NULL, NULL, &notify->find);
+               &notify->ns, options, 0, notify->zone->view->dstport, 0, NULL,
+               NULL, &notify->find);
        dns_adb_detach(&adb);
 
        /* Something failed? */
@@ -21351,8 +21351,8 @@ checkds_find_address(dns_checkds_t *checkds) {
 
        result = dns_adb_createfind(
                adb, checkds->zone->loop, process_checkds_adb_event, checkds,
-               &checkds->ns, dns_rootname, 0, options, 0,
-               checkds->zone->view->dstport, 0, NULL, NULL, &checkds->find);
+               &checkds->ns, options, 0, checkds->zone->view->dstport, 0, NULL,
+               NULL, &checkds->find);
        dns_adb_detach(&adb);
 
        /* Something failed? */