cache loading

This commit is contained in:
Bob Halley 1999-10-25 18:59:20 +00:00
parent 925c6e6f4d
commit 73ca2fa486
2 changed files with 19 additions and 2 deletions

View file

@ -82,6 +82,11 @@ EXTERN const char * ns_g_conffile INIT("/etc/named.conf");
*/
EXTERN isc_boolean_t ns_g_coreok INIT(ISC_TRUE);
/*
* XXX Temporary.
*/
EXTERN const char * ns_g_cachefile INIT(NULL);
#undef EXTERN
#undef INIT

View file

@ -99,6 +99,19 @@ create_default_view(isc_mem_t *mctx, dns_rdataclass_t rdclass,
dns_view_setcachedb(view, db);
dns_db_detach(&db);
/*
* XXXRTH Temporary support for loading cache contents.
*/
if (ns_g_cachefile != NULL) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER,
ISC_LOG_DEBUG(1), "loading cache '%s'",
ns_g_cachefile);
result = dns_db_load(view->cachedb, ns_g_cachefile);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
/*
* Resolver.
*
@ -308,9 +321,8 @@ load_configuration(const char *filename) {
ISC_LIST_APPEND(lctx.viewlist, view, link);
/*
* Load zones. (???)
* Load zones.
*/
for (view = ISC_LIST_HEAD(lctx.viewlist);
view != NULL;
view = view_next) {