From 29c5e3b873c83c48ee4be4bc9c480eb146a35604 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Fri, 20 Aug 1999 19:00:49 +0000 Subject: [PATCH] Initialize and destroy the TSIG subsystem --- bin/named/main.c | 6 ++++++ bin/tests/res_test.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/bin/named/main.c b/bin/named/main.c index 1a8e2fe7af..31da605f4f 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -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 diff --git a/bin/tests/res_test.c b/bin/tests/res_test.c index cacc6a4e1a..79a297d58f 100644 --- a/bin/tests/res_test.c +++ b/bin/tests/res_test.c @@ -45,6 +45,7 @@ #include #include #include +#include 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);