mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
parent
97a5091abc
commit
bc12d6c0d6
@ -386,18 +386,18 @@ void ConfigObject::Activate(bool runtimeCreated)
|
|||||||
{
|
{
|
||||||
CONTEXT("Activating object '" + GetName() + "' of type '" + GetType()->GetName() + "'");
|
CONTEXT("Activating object '" + GetName() + "' of type '" + GetType()->GetName() + "'");
|
||||||
|
|
||||||
Start(runtimeCreated);
|
|
||||||
|
|
||||||
ASSERT(GetStartCalled());
|
|
||||||
|
|
||||||
{
|
{
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
|
|
||||||
|
Start(runtimeCreated);
|
||||||
|
|
||||||
|
ASSERT(GetStartCalled());
|
||||||
ASSERT(!IsActive());
|
ASSERT(!IsActive());
|
||||||
SetActive(true, true);
|
SetActive(true, true);
|
||||||
}
|
|
||||||
|
|
||||||
if (GetHAMode() == HARunEverywhere)
|
if (GetHAMode() == HARunEverywhere)
|
||||||
SetAuthority(true);
|
SetAuthority(true);
|
||||||
|
}
|
||||||
|
|
||||||
NotifyActive();
|
NotifyActive();
|
||||||
}
|
}
|
||||||
@ -422,12 +422,12 @@ void ConfigObject::Deactivate(bool runtimeRemoved)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
SetActive(false, true);
|
SetActive(false, true);
|
||||||
|
|
||||||
|
SetAuthority(false);
|
||||||
|
|
||||||
|
Stop(runtimeRemoved);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetAuthority(false);
|
|
||||||
|
|
||||||
Stop(runtimeRemoved);
|
|
||||||
|
|
||||||
ASSERT(GetStopCalled());
|
ASSERT(GetStopCalled());
|
||||||
|
|
||||||
NotifyActive();
|
NotifyActive();
|
||||||
@ -465,6 +465,8 @@ void ConfigObject::Resume(void)
|
|||||||
|
|
||||||
void ConfigObject::SetAuthority(bool authority)
|
void ConfigObject::SetAuthority(bool authority)
|
||||||
{
|
{
|
||||||
|
ObjectLock olock(this);
|
||||||
|
|
||||||
if (authority && GetPaused()) {
|
if (authority && GetPaused()) {
|
||||||
SetResumeCalled(false);
|
SetResumeCalled(false);
|
||||||
Resume();
|
Resume();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user