mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
parent
2a5a9d2f4b
commit
fd65fed6f0
@ -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…
x
Reference in New Issue
Block a user