mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-23 15:17:01 -04:00
Don't start omapi if running in lwresd mode
This commit is contained in:
parent
d5563fcd35
commit
d195e2df32
1 changed files with 23 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue