create a task pool for use by the zones

This commit is contained in:
Andreas Gustafsson 1999-10-21 00:33:54 +00:00
parent 584ba0e67d
commit ef0cb3cc5b
2 changed files with 12 additions and 1 deletions

View file

@ -21,6 +21,7 @@
#include <isc/types.h>
#include <isc/rwlock.h>
#include <isc/net.h>
#include <isc/taskpool.h>
#include <dns/types.h>
#include <dns/confctx.h>
@ -52,6 +53,7 @@ EXTERN ns_interfacemgr_t * ns_g_interfacemgr INIT(NULL);
EXTERN ns_clientmgr_t * ns_g_clientmgr INIT(NULL);
EXTERN char * ns_g_version INIT(VERSION);
EXTERN in_port_t ns_g_port INIT(5544);
EXTERN isc_taskpool_t * ns_g_zonetasks INIT(NULL);
EXTERN dns_viewlist_t ns_g_viewlist;
EXTERN isc_rwlock_t ns_g_viewlock;

View file

@ -425,7 +425,9 @@ create_version_view(void) {
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_zone_replacedb(zone, db, ISC_FALSE);
result = dns_zone_replacedb(zone, db, ISC_FALSE);
if (result != DNS_R_SUCCESS)
goto cleanup;
result = dns_view_addzone(view, zone);
if (result != DNS_R_SUCCESS)
@ -476,6 +478,8 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
isc_task_detach(&server_task);
isc_taskpool_destroy(&ns_g_zonetasks);
dns_view_detach(&version_view);
ns_rootns_destroy();
@ -498,6 +502,11 @@ ns_server_init(void) {
if (result != ISC_R_SUCCESS)
return (result);
result = isc_taskpool_create(ns_g_taskmgr, ns_g_mctx, 8 /* XXX */,
0, &ns_g_zonetasks);
if (result != ISC_R_SUCCESS)
return (result);
/*
* Setup the server task, which is responsible for coordinating
* startup and shutdown of the server.