2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Initialize and destroy the TSIG subsystem

This commit is contained in:
Brian Wellington
1999-08-20 19:00:49 +00:00
parent 6d4886fa74
commit 29c5e3b873
2 changed files with 10 additions and 0 deletions

View File

@@ -216,11 +216,17 @@ setup() {
if (result != ISC_R_SUCCESS)
early_fatal("ns_server_init() failed: %s",
isc_result_totext(result));
result = dns_tsig_init(ns_g_mctx);
if (result != ISC_R_SUCCESS)
early_fatal("dns_tsig_init() failed: %s",
isc_result_totext(result));
}
static void
cleanup() {
destroy_managers();
dns_tsig_destroy();
#if 0
isc_rwlock_destroy(&ns_g_viewlock);
#endif

View File

@@ -45,6 +45,7 @@
#include <dns/resolver.h>
#include <dns/events.h>
#include <dns/dispatch.h>
#include <dns/tsig.h>
isc_mutex_t lock;
@@ -184,6 +185,8 @@ main(int argc, char *argv[]) {
socketmgr = NULL;
RUNTIME_CHECK(isc_socketmgr_create(mctx, &socketmgr) == ISC_R_SUCCESS);
RUNTIME_CHECK(dns_tsig_init(mctx) == ISC_R_SUCCESS);
argc -= optind;
argv += optind;
@@ -239,6 +242,7 @@ main(int argc, char *argv[]) {
isc_socketmgr_destroy(&socketmgr);
isc_timermgr_destroy(&timermgr);
dns_tsig_destroy();
if (verbose)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);