mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
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);
|
||||
|
||||
ServiceState new_state = cr->GetState();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
SetStateRaw(new_state);
|
||||
|
||||
bool stateChange;
|
||||
|
||||
@ -362,7 +349,20 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
||||
cr->SetVarsAfter(vars_after);
|
||||
|
||||
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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user