From d195e2df3240a5b5137101b2da803bfb1acd2135 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Mon, 19 Jun 2000 22:29:09 +0000 Subject: [PATCH] Don't start omapi if running in lwresd mode --- bin/named/main.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/bin/named/main.c b/bin/named/main.c index 41f8e717ca..19dc049c9c 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -291,10 +291,12 @@ create_managers(void) { static void destroy_managers(void) { - if (ns_g_omapimgr != NULL) - omapi_listener_shutdown(ns_g_omapimgr); - else - omapi_lib_destroy(); + if (!lwresd_only) { + if (ns_g_omapimgr != NULL) + omapi_listener_shutdown(ns_g_omapimgr); + else + omapi_lib_destroy(); + } dns_dispatchmgr_destroy(&ns_g_dispatchmgr); /* @@ -355,21 +357,23 @@ setup(void) { } else ns_server_create(ns_g_mctx, &ns_g_server); - result = ns_omapi_init(); - if (result != ISC_R_SUCCESS) - ns_main_earlyfatal("omapi_lib_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)); + if (!lwresd_only) { + result = ns_omapi_init(); + if (result != ISC_R_SUCCESS) + ns_main_earlyfatal("omapi_lib_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