Skip to content

Commit 0873153

Browse files
committed
Use GetParents() in FireSppressedNotifications()
It's way efficient than accessing them through the dependency objects, plus we won't have any duplicates.
1 parent dd5f480 commit 0873153

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/icinga/checkable-notification.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ void Checkable::FireSuppressedNotifications()
167167
}
168168
}
169169

170-
for (auto& dep : GetDependencies()) {
171-
auto parent (dep->GetParent());
170+
for (auto& parent : GetParents()) {
172171
ObjectLock oLock (parent);
173172

174173
if (!parent->GetProblem() && parent->GetLastStateChange() >= threshold) {

0 commit comments

Comments
 (0)