2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

libdns refactoring: get rid of 3 versions of dns_resolver_createfetch

This commit is contained in:
Witold Kręcicki
2018-04-03 16:05:11 +02:00
parent 25cd3168a7
commit 42ee8c853a
11 changed files with 53 additions and 109 deletions

View File

@@ -2446,13 +2446,13 @@ query_prefetch(ns_client_t *client, dns_name_t *qname,
peeraddr = NULL;
ns_client_attach(client, &dummy);
options = client->query.fetchoptions | DNS_FETCHOPT_PREFETCH;
result = dns_resolver_createfetch3(client->view->resolver,
qname, rdataset->type, NULL, NULL,
NULL, peeraddr, client->message->id,
options, 0, NULL, client->task,
prefetch_done, client,
tmprdataset, NULL,
&client->query.prefetch);
result = dns_resolver_createfetch(client->view->resolver,
qname, rdataset->type, NULL, NULL,
NULL, peeraddr, client->message->id,
options, 0, NULL, client->task,
prefetch_done, client,
tmprdataset, NULL,
&client->query.prefetch);
if (result != ISC_R_SUCCESS) {
query_putrdataset(client, &tmprdataset);
ns_client_detach(&dummy);
@@ -2653,12 +2653,12 @@ query_rpzfetch(ns_client_t *client, dns_name_t *qname, dns_rdatatype_t type) {
peeraddr = NULL;
ns_client_attach(client, &dummy);
options = client->query.fetchoptions;
result = dns_resolver_createfetch3(client->view->resolver, qname, type,
NULL, NULL, NULL, peeraddr,
client->message->id, options, 0,
NULL, client->task, prefetch_done,
client, tmprdataset, NULL,
&client->query.prefetch);
result = dns_resolver_createfetch(client->view->resolver, qname, type,
NULL, NULL, NULL, peeraddr,
client->message->id, options, 0,
NULL, client->task, prefetch_done,
client, tmprdataset, NULL,
&client->query.prefetch);
if (result != ISC_R_SUCCESS) {
query_putrdataset(client, &tmprdataset);
ns_client_detach(&dummy);
@@ -5650,13 +5650,13 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
peeraddr = &client->peeraddr;
}
result = dns_resolver_createfetch3(client->view->resolver,
qname, qtype, qdomain, nameservers,
NULL, peeraddr, client->message->id,
client->query.fetchoptions, 0, NULL,
client->task, fetch_callback,
client, rdataset, sigrdataset,
&client->query.fetch);
result = dns_resolver_createfetch(client->view->resolver,
qname, qtype, qdomain, nameservers,
NULL, peeraddr, client->message->id,
client->query.fetchoptions, 0, NULL,
client->task, fetch_callback,
client, rdataset, sigrdataset,
&client->query.fetch);
if (result != ISC_R_SUCCESS) {
query_putrdataset(client, &rdataset);
if (sigrdataset != NULL) {