Commit d195e2df authored by Brian Wellington's avatar Brian Wellington
Browse files

Don't start omapi if running in lwresd mode

parent d5563fcd
...@@ -291,10 +291,12 @@ create_managers(void) { ...@@ -291,10 +291,12 @@ create_managers(void) {
static void static void
destroy_managers(void) { destroy_managers(void) {
if (ns_g_omapimgr != NULL) if (!lwresd_only) {
omapi_listener_shutdown(ns_g_omapimgr); if (ns_g_omapimgr != NULL)
else omapi_listener_shutdown(ns_g_omapimgr);
omapi_lib_destroy(); else
omapi_lib_destroy();
}
dns_dispatchmgr_destroy(&ns_g_dispatchmgr); dns_dispatchmgr_destroy(&ns_g_dispatchmgr);
/* /*
...@@ -355,21 +357,23 @@ setup(void) { ...@@ -355,21 +357,23 @@ setup(void) {
} else } else
ns_server_create(ns_g_mctx, &ns_g_server); ns_server_create(ns_g_mctx, &ns_g_server);
result = ns_omapi_init(); if (!lwresd_only) {
if (result != ISC_R_SUCCESS) result = ns_omapi_init();
ns_main_earlyfatal("omapi_lib_init() failed: %s", if (result != ISC_R_SUCCESS)
isc_result_totext(result)); ns_main_earlyfatal("omapi_lib_init() failed: %s",
isc_result_totext(result));
result = ns_omapi_listen(&ns_g_omapimgr);
if (result == ISC_R_SUCCESS) result = ns_omapi_listen(&ns_g_omapimgr);
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, if (result == ISC_R_SUCCESS)
NS_LOGMODULE_MAIN, ISC_LOG_DEBUG(3), isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
"OMAPI started"); NS_LOGMODULE_MAIN, ISC_LOG_DEBUG(3),
else "OMAPI started");
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, else
NS_LOGMODULE_MAIN, ISC_LOG_WARNING, isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
"OMAPI failed to start: %s", NS_LOGMODULE_MAIN, ISC_LOG_WARNING,
isc_result_totext(result)); "OMAPI failed to start: %s",
isc_result_totext(result));
}
} }
static void static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment