mirror of https://github.com/Icinga/icinga2.git
Merge pull request #7884 from Icinga/bugfix/on-host-problem-changed
Fix OnHostProblemChanged signal
This commit is contained in:
commit
27dcb8f221
|
@ -248,20 +248,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
||||||
SetCheckAttempt(attempt);
|
SetCheckAttempt(attempt);
|
||||||
|
|
||||||
ServiceState new_state = cr->GetState();
|
ServiceState new_state = cr->GetState();
|
||||||
|
SetStateRaw(new_state);
|
||||||
if (service) {
|
|
||||||
SetStateRaw(new_state);
|
|
||||||
} else {
|
|
||||||
bool wasProblem = GetProblem();
|
|
||||||
|
|
||||||
SetStateRaw(new_state);
|
|
||||||
|
|
||||||
if (GetProblem() != wasProblem) {
|
|
||||||
for (auto& service : host->GetServices()) {
|
|
||||||
Service::OnHostProblemChanged(service, cr, origin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool stateChange;
|
bool stateChange;
|
||||||
|
|
||||||
|
@ -362,7 +349,20 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
||||||
cr->SetVarsAfter(vars_after);
|
cr->SetVarsAfter(vars_after);
|
||||||
|
|
||||||
olock.Lock();
|
olock.Lock();
|
||||||
SetLastCheckResult(cr);
|
|
||||||
|
if (service) {
|
||||||
|
SetLastCheckResult(cr);
|
||||||
|
} else {
|
||||||
|
bool wasProblem = GetProblem();
|
||||||
|
|
||||||
|
SetLastCheckResult(cr);
|
||||||
|
|
||||||
|
if (GetProblem() != wasProblem) {
|
||||||
|
for (auto& service : host->GetServices()) {
|
||||||
|
Service::OnHostProblemChanged(service, cr, origin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool was_flapping = IsFlapping();
|
bool was_flapping = IsFlapping();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue