From 11efdeb076d65fa9f0c5fc067dc040e7c99dfba6 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Mon, 25 Oct 1999 21:39:08 +0000 Subject: [PATCH] fix --- lib/dns/adb.c | 11 +++++++++-- lib/dns/include/dns/adb.h | 10 ++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 6476d69ab7..bcbc37a450 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -41,10 +41,12 @@ #include #include #include -#include #include #include #include +#include +#include #include #include "../isc/util.h" @@ -86,6 +88,8 @@ struct dns_adb { isc_condition_t shutdown_cond; isc_mem_t *mctx; dns_view_t *view; + isc_timermgr_t *timermgr; + isc_taskmgr_t *taskmgr; unsigned int irefcnt; unsigned int erefcnt; @@ -1000,7 +1004,8 @@ destroy(dns_adb_t *adb) */ 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; 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->view = view; + adb->timermgr = timermgr; + adb->taskmgr = taskmgr; adb->magic = DNS_ADB_MAGIC; *newadb = adb; return (ISC_R_SUCCESS); diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h index c0abbd988c..071775c7b6 100644 --- a/lib/dns/include/dns/adb.h +++ b/lib/dns/include/dns/adb.h @@ -185,7 +185,8 @@ struct dns_adbaddrinfo { 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. * @@ -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 * until the new isc_addrtable_t is deleted) * - * 'view' be a pointer to a valid viewif the database is to make - * queries to resolve names. If it is used only as storage, this - * entry may be NULL. + * 'view' be a pointer to a valid view. + * + * 'tmgr' be a pointer to a valid timer manager. If this is NULL, + * no periodic cleaning will ever occur. * * 'newadb' != NULL && '*newadb' == NULL. *