2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00
This commit is contained in:
Michael Graff 1999-10-25 21:39:08 +00:00
parent f96d5fd14e
commit 11efdeb076
2 changed files with 15 additions and 6 deletions

View File

@ -41,10 +41,12 @@
#include <dns/adb.h> #include <dns/adb.h>
#include <dns/db.h> #include <dns/db.h>
#include <dns/events.h> #include <dns/events.h>
#include <dns/ #include <dns/fixedname.h>
#include <dns/name.h> #include <dns/name.h>
#include <dns/rdata.h> #include <dns/rdata.h>
#include <dns/rdataset.h> #include <dns/rdataset.h>
#include <dns/resolver.h>
#include <dns/types.h>
#include <dns/view.h> #include <dns/view.h>
#include "../isc/util.h" #include "../isc/util.h"
@ -86,6 +88,8 @@ struct dns_adb {
isc_condition_t shutdown_cond; isc_condition_t shutdown_cond;
isc_mem_t *mctx; isc_mem_t *mctx;
dns_view_t *view; dns_view_t *view;
isc_timermgr_t *timermgr;
isc_taskmgr_t *taskmgr;
unsigned int irefcnt; unsigned int irefcnt;
unsigned int erefcnt; unsigned int erefcnt;
@ -1000,7 +1004,8 @@ destroy(dns_adb_t *adb)
*/ */
isc_result_t isc_result_t
dns_adb_create(isc_mem_t *mem, dns_view_t *view, dns_adb_t **newadb) dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *taskmgr,
isc_taskmgr_t *taskmgr, dns_adb_t **newadb)
{ {
dns_adb_t *adb; dns_adb_t *adb;
isc_result_t result; isc_result_t result;
@ -1090,6 +1095,8 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, dns_adb_t **newadb)
*/ */
adb->mctx = mem; adb->mctx = mem;
adb->view = view; adb->view = view;
adb->timermgr = timermgr;
adb->taskmgr = taskmgr;
adb->magic = DNS_ADB_MAGIC; adb->magic = DNS_ADB_MAGIC;
*newadb = adb; *newadb = adb;
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);

View File

@ -185,7 +185,8 @@ struct dns_adbaddrinfo {
isc_result_t isc_result_t
dns_adb_create(isc_mem_t *mem, dns_view_t *view, dns_adb_t **newadb); dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *tmgr,
dns_adb_t **newadb);
/* /*
* Create a new ADB. * Create a new ADB.
* *
@ -195,9 +196,10 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, dns_adb_t **newadb);
* allocations will happen through (and so must remain valid at least * allocations will happen through (and so must remain valid at least
* until the new isc_addrtable_t is deleted) * until the new isc_addrtable_t is deleted)
* *
* 'view' be a pointer to a valid viewif the database is to make * 'view' be a pointer to a valid view.
* queries to resolve names. If it is used only as storage, this *
* entry may be NULL. * 'tmgr' be a pointer to a valid timer manager. If this is NULL,
* no periodic cleaning will ever occur.
* *
* 'newadb' != NULL && '*newadb' == NULL. * 'newadb' != NULL && '*newadb' == NULL.
* *