mirror of https://github.com/Icinga/icinga2.git
parent
eda28b219d
commit
93834623a0
|
@ -53,6 +53,11 @@ ApiListener::ApiListener(void)
|
||||||
|
|
||||||
void ApiListener::OnConfigLoaded(void)
|
void ApiListener::OnConfigLoaded(void)
|
||||||
{
|
{
|
||||||
|
if (m_Instance)
|
||||||
|
BOOST_THROW_EXCEPTION(ScriptError("Only one ApiListener object is allowed.", GetDebugInfo()));
|
||||||
|
|
||||||
|
m_Instance = this;
|
||||||
|
|
||||||
/* set up SSL context */
|
/* set up SSL context */
|
||||||
boost::shared_ptr<X509> cert;
|
boost::shared_ptr<X509> cert;
|
||||||
try {
|
try {
|
||||||
|
@ -104,11 +109,6 @@ void ApiListener::Start(bool runtimeCreated)
|
||||||
{
|
{
|
||||||
SyncZoneDirs();
|
SyncZoneDirs();
|
||||||
|
|
||||||
if (m_Instance)
|
|
||||||
BOOST_THROW_EXCEPTION(ScriptError("Only one ApiListener object is allowed.", GetDebugInfo()));
|
|
||||||
|
|
||||||
m_Instance = this;
|
|
||||||
|
|
||||||
ObjectImpl<ApiListener>::Start(runtimeCreated);
|
ObjectImpl<ApiListener>::Start(runtimeCreated);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue