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

Clean up the dns_dispatch_getudp API

Cleanup unused parts of dns_dispatch_getudp API, remove
dns_dispatch_getudp_dup() function and related code.
This commit is contained in:
Ondřej Surý
2021-05-12 23:27:15 +02:00
parent f487c6948b
commit 7cbfbc8faa
13 changed files with 34 additions and 228 deletions

View File

@@ -201,7 +201,7 @@ getudpdispatch(int family, dns_dispatchmgr_t *dispatchmgr,
isc_socketmgr_t *socketmgr, isc_taskmgr_t *taskmgr,
bool is_shared, dns_dispatch_t **dispp,
const isc_sockaddr_t *localaddr) {
unsigned int attrs, attrmask;
unsigned int attrs;
dns_dispatch_t *disp;
unsigned buffersize, maxbuffers, maxrequests, buckets, increment;
isc_result_t result;
@@ -220,11 +220,6 @@ getudpdispatch(int family, dns_dispatchmgr_t *dispatchmgr,
INSIST(0);
ISC_UNREACHABLE();
}
attrmask = 0;
attrmask |= DNS_DISPATCHATTR_UDP;
attrmask |= DNS_DISPATCHATTR_TCP;
attrmask |= DNS_DISPATCHATTR_IPV4;
attrmask |= DNS_DISPATCHATTR_IPV6;
if (localaddr == NULL) {
isc_sockaddr_anyofpf(&anyaddr, family);
@@ -240,8 +235,7 @@ getudpdispatch(int family, dns_dispatchmgr_t *dispatchmgr,
disp = NULL;
result = dns_dispatch_getudp(dispatchmgr, socketmgr, taskmgr, localaddr,
buffersize, maxbuffers, maxrequests,
buckets, increment, attrs, attrmask,
&disp);
buckets, increment, attrs, &disp);
if (result == ISC_R_SUCCESS) {
*dispp = disp;
}