mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
319. [func] The named.conf "controls" statement is now used
to configure the OMAPI command channel. [RT #145]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: main.c,v 1.72 2000/07/01 00:48:02 tale Exp $ */
|
||||
/* $Id: main.c,v 1.73 2000/07/10 11:34:56 tale Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -385,12 +385,12 @@ create_managers(void) {
|
||||
|
||||
static void
|
||||
destroy_managers(void) {
|
||||
if (!lwresd_only) {
|
||||
if (ns_g_omapimgr != NULL)
|
||||
omapi_listener_shutdown(ns_g_omapimgr);
|
||||
else
|
||||
omapi_lib_destroy();
|
||||
}
|
||||
if (!lwresd_only)
|
||||
/*
|
||||
* The omapi listeners need to be stopped here so that
|
||||
* isc_taskmgr_destroy() won't block on the omapi task.
|
||||
*/
|
||||
ns_omapi_shutdown(ISC_TRUE);
|
||||
|
||||
isc_entropy_detach(&ns_g_entropy);
|
||||
/*
|
||||
@@ -455,29 +455,20 @@ setup(void) {
|
||||
if (!lwresd_only) {
|
||||
result = ns_omapi_init();
|
||||
if (result != ISC_R_SUCCESS)
|
||||
ns_main_earlyfatal("omapi_lib_init() failed: %s",
|
||||
ns_main_earlyfatal("ns_omapi_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
result = ns_omapi_listen(&ns_g_omapimgr);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_MAIN, ISC_LOG_DEBUG(3),
|
||||
"OMAPI started");
|
||||
else
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_MAIN, ISC_LOG_WARNING,
|
||||
"OMAPI failed to start: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
cleanup(void) {
|
||||
destroy_managers();
|
||||
|
||||
if (lwresd_only)
|
||||
ns_lwresd_destroy(&ns_g_lwresd);
|
||||
else
|
||||
ns_server_destroy(&ns_g_server);
|
||||
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
||||
ISC_LOG_NOTICE, "exiting");
|
||||
ns_log_shutdown();
|
||||
@@ -543,5 +534,3 @@ main(int argc, char *argv[]) {
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user