"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/icinga/checkable-dependency.cpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

checkable-dependency.cpp  (icinga2-2.11.5):checkable-dependency.cpp  (icinga2-2.12.0)
skipping to change at line 75 skipping to change at line 75
Host::Ptr host = service->GetHost(); Host::Ptr host = service->GetHost();
if (host && host->GetState() != HostUp && host->GetStateType() == StateTypeHard) { if (host && host->GetState() != HostUp && host->GetStateType() == StateTypeHard) {
if (failedDependency) if (failedDependency)
*failedDependency = nullptr; *failedDependency = nullptr;
return false; return false;
} }
} }
for (const Dependency::Ptr& dep : GetDependencies()) { auto deps = GetDependencies();
int countDeps = deps.size();
int countFailed = 0;
for (const Dependency::Ptr& dep : deps) {
if (!dep->IsAvailable(dt)) { if (!dep->IsAvailable(dt)) {
countFailed++;
if (failedDependency) if (failedDependency)
*failedDependency = dep; *failedDependency = dep;
return false;
} }
} }
/* If there are dependencies, and all of them failed, mark as unreachable
. */
if (countDeps > 0 && countFailed == countDeps) {
Log(LogDebug, "Checkable")
<< "All dependencies have failed for checkable '" << GetN
ame() << "': Marking as unreachable.";
return false;
}
if (failedDependency) if (failedDependency)
*failedDependency = nullptr; *failedDependency = nullptr;
return true; return true;
} }
std::set<Checkable::Ptr> Checkable::GetParents() const std::set<Checkable::Ptr> Checkable::GetParents() const
{ {
std::set<Checkable::Ptr> parents; std::set<Checkable::Ptr> parents;
 End of changes. 4 change blocks. 
3 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)