mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
Address comments from review
This commit is contained in:
parent
abf2fb392b
commit
9d40de78eb
@ -344,14 +344,21 @@ Checkable::ProcessingResult Checkable::ProcessCheckResult(const CheckResult::Ptr
|
|||||||
|
|
||||||
cr->SetVarsAfter(vars_after);
|
cr->SetVarsAfter(vars_after);
|
||||||
|
|
||||||
bool problem_change = false;
|
|
||||||
if (service) {
|
if (service) {
|
||||||
SetLastCheckResult(cr);
|
SetLastCheckResult(cr);
|
||||||
} else {
|
} else {
|
||||||
bool wasProblem = GetProblem();
|
bool wasProblem = GetProblem();
|
||||||
|
|
||||||
SetLastCheckResult(cr);
|
SetLastCheckResult(cr);
|
||||||
problem_change = GetProblem() != wasProblem;
|
|
||||||
|
if (GetProblem() != wasProblem) {
|
||||||
|
auto services = host->GetServices();
|
||||||
|
for (auto& service : services) {
|
||||||
|
Service::OnHostProblemChanged(service, cr, origin);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool was_flapping = IsFlapping();
|
bool was_flapping = IsFlapping();
|
||||||
|
|
||||||
UpdateFlappingStatus(cr->GetState());
|
UpdateFlappingStatus(cr->GetState());
|
||||||
@ -501,13 +508,7 @@ Checkable::ProcessingResult Checkable::ProcessCheckResult(const CheckResult::Ptr
|
|||||||
if ((stateChange || hardChange) && !children.empty() && (affectsPreviousStateChildren || AffectsChildren()))
|
if ((stateChange || hardChange) && !children.empty() && (affectsPreviousStateChildren || AffectsChildren()))
|
||||||
OnReachabilityChanged(this, cr, children, origin);
|
OnReachabilityChanged(this, cr, children, origin);
|
||||||
|
|
||||||
olock->Unlock();
|
olock.Unlock();
|
||||||
if (!service && problem_change) {
|
|
||||||
auto services = host->GetServices();
|
|
||||||
for (auto& service : services) {
|
|
||||||
Service::OnHostProblemChanged(service, cr, origin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (recovery) {
|
if (recovery) {
|
||||||
for (auto& child : children) {
|
for (auto& child : children) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user