Skip to content

Commit

Permalink
Merge pull request #9542 from Icinga/context-evaluating-apply-rules-f…
Browse files Browse the repository at this point in the history
…or-host

Construct string once, not unnecessarily N times
  • Loading branch information
julianbrost authored Oct 17, 2022
2 parents dd7009d + ce1a122 commit f2563cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/icinga/service-apply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ bool Service::EvaluateApplyRule(const Host::Ptr& host, const ApplyRule& rule)

void Service::EvaluateApplyRules(const Host::Ptr& host)
{
for (ApplyRule& rule : ApplyRule::GetRules("Service")) {
CONTEXT("Evaluating 'apply' rules for host '" + host->GetName() + "'");
CONTEXT("Evaluating 'apply' rules for host '" + host->GetName() + "'");

for (ApplyRule& rule : ApplyRule::GetRules("Service")) {
if (EvaluateApplyRule(host, rule))
rule.AddMatch();
}
Expand Down

0 comments on commit f2563cc

Please sign in to comment.