mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 23:55:27 +00:00
clean up some unused functions
dns_fwdtable_delete() was only used by dns_client_clearservers(), which in turn was never used. both functions have now been deleted.
This commit is contained in:
@@ -396,23 +396,6 @@ dns_client_setservers(dns_client_t *client, dns_rdataclass_t rdclass,
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
dns_client_clearservers(dns_client_t *client, dns_rdataclass_t rdclass,
|
|
||||||
const dns_name_t *name_space) {
|
|
||||||
isc_result_t result;
|
|
||||||
|
|
||||||
REQUIRE(DNS_CLIENT_VALID(client));
|
|
||||||
REQUIRE(rdclass == dns_rdataclass_in);
|
|
||||||
|
|
||||||
if (name_space == NULL) {
|
|
||||||
name_space = dns_rootname;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = dns_fwdtable_delete(client->view->fwdtable, name_space);
|
|
||||||
|
|
||||||
return (result);
|
|
||||||
}
|
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
getrdataset(isc_mem_t *mctx, dns_rdataset_t **rdatasetp) {
|
getrdataset(isc_mem_t *mctx, dns_rdataset_t **rdatasetp) {
|
||||||
dns_rdataset_t *rdataset;
|
dns_rdataset_t *rdataset;
|
||||||
|
@@ -167,19 +167,6 @@ cleanup:
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
dns_fwdtable_delete(dns_fwdtable_t *fwdtable, const dns_name_t *name) {
|
|
||||||
isc_result_t result;
|
|
||||||
|
|
||||||
REQUIRE(VALID_FWDTABLE(fwdtable));
|
|
||||||
|
|
||||||
RWLOCK(&fwdtable->rwlock, isc_rwlocktype_write);
|
|
||||||
result = dns_rbt_deletename(fwdtable->table, name, false);
|
|
||||||
RWUNLOCK(&fwdtable->rwlock, isc_rwlocktype_write);
|
|
||||||
|
|
||||||
return (result);
|
|
||||||
}
|
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
dns_fwdtable_find(dns_fwdtable_t *fwdtable, const dns_name_t *name,
|
dns_fwdtable_find(dns_fwdtable_t *fwdtable, const dns_name_t *name,
|
||||||
dns_name_t *foundname, dns_forwarders_t **forwardersp) {
|
dns_name_t *foundname, dns_forwarders_t **forwardersp) {
|
||||||
|
@@ -174,27 +174,6 @@ dns_client_setservers(dns_client_t *client, dns_rdataclass_t rdclass,
|
|||||||
*\li Anything else Failure.
|
*\li Anything else Failure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
dns_client_clearservers(dns_client_t *client, dns_rdataclass_t rdclass,
|
|
||||||
const dns_name_t *name_space);
|
|
||||||
/*%<
|
|
||||||
* Remove configured recursive name servers for the 'rdclass' and 'name_space'
|
|
||||||
* from the client. See the description of dns_client_setservers() for
|
|
||||||
* the requirements about 'rdclass' and 'name_space'.
|
|
||||||
*
|
|
||||||
* Requires:
|
|
||||||
*
|
|
||||||
*\li 'client' is a valid client.
|
|
||||||
*
|
|
||||||
*\li 'name_space' is NULL or a valid name.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
*
|
|
||||||
*\li #ISC_R_SUCCESS On success.
|
|
||||||
*
|
|
||||||
*\li Anything else Failure.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef void (*dns_client_resolve_cb)(dns_client_t *client,
|
typedef void (*dns_client_resolve_cb)(dns_client_t *client,
|
||||||
const dns_name_t *name,
|
const dns_name_t *name,
|
||||||
dns_namelist_t *namelist,
|
dns_namelist_t *namelist,
|
||||||
|
@@ -73,22 +73,6 @@ dns_fwdtable_add(dns_fwdtable_t *fwdtable, const dns_name_t *name,
|
|||||||
* \li #ISC_R_NOMEMORY
|
* \li #ISC_R_NOMEMORY
|
||||||
*/
|
*/
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
dns_fwdtable_delete(dns_fwdtable_t *fwdtable, const dns_name_t *name);
|
|
||||||
/*%<
|
|
||||||
* Removes an entry for 'name' from the forwarding table. If an entry
|
|
||||||
* that exactly matches 'name' does not exist, ISC_R_NOTFOUND will be returned.
|
|
||||||
*
|
|
||||||
* Requires:
|
|
||||||
* \li fwdtable is a valid forwarding table.
|
|
||||||
* \li name is a valid name
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* \li #ISC_R_SUCCESS
|
|
||||||
* \li #ISC_R_NOTFOUND
|
|
||||||
* \li #ISC_R_NOSPACE
|
|
||||||
*/
|
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
dns_fwdtable_find(dns_fwdtable_t *fwdtable, const dns_name_t *name,
|
dns_fwdtable_find(dns_fwdtable_t *fwdtable, const dns_name_t *name,
|
||||||
dns_name_t *foundname, dns_forwarders_t **forwardersp);
|
dns_name_t *foundname, dns_forwarders_t **forwardersp);
|
||||||
|
Reference in New Issue
Block a user