From 551cb6ae8799f92368b092b283a7a8b9a770e8a5 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 24 Feb 2015 17:51:16 +0100 Subject: [PATCH] Don't convert loop variables to string when using apply-for fixes #8519 --- lib/icinga/dependency-apply.cpp | 2 +- lib/icinga/notification-apply.cpp | 2 +- lib/icinga/scheduleddowntime-apply.cpp | 2 +- lib/icinga/service-apply.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/icinga/dependency-apply.cpp b/lib/icinga/dependency-apply.cpp index 07ccf762a..119a7cd91 100644 --- a/lib/icinga/dependency-apply.cpp +++ b/lib/icinga/dependency-apply.cpp @@ -123,7 +123,7 @@ bool Dependency::EvaluateApplyRule(const Checkable::Ptr& checkable, const ApplyR Array::Ptr arrclone = arr->ShallowClone(); ObjectLock olock(arrclone); - BOOST_FOREACH(const String& instance, arrclone) { + BOOST_FOREACH(const Value& instance, arrclone) { String name = rule.GetName(); if (!rule.GetFKVar().IsEmpty()) { diff --git a/lib/icinga/notification-apply.cpp b/lib/icinga/notification-apply.cpp index 16a8f9d09..8112aa310 100644 --- a/lib/icinga/notification-apply.cpp +++ b/lib/icinga/notification-apply.cpp @@ -121,7 +121,7 @@ bool Notification::EvaluateApplyRule(const Checkable::Ptr& checkable, const Appl Array::Ptr arr = vinstances; ObjectLock olock(arr); - BOOST_FOREACH(const String& instance, arr) { + BOOST_FOREACH(const Value& instance, arr) { String name = rule.GetName(); if (!rule.GetFKVar().IsEmpty()) { diff --git a/lib/icinga/scheduleddowntime-apply.cpp b/lib/icinga/scheduleddowntime-apply.cpp index 9180ef477..452f75b08 100644 --- a/lib/icinga/scheduleddowntime-apply.cpp +++ b/lib/icinga/scheduleddowntime-apply.cpp @@ -121,7 +121,7 @@ bool ScheduledDowntime::EvaluateApplyRule(const Checkable::Ptr& checkable, const Array::Ptr arrclone = arr->ShallowClone(); ObjectLock olock(arrclone); - BOOST_FOREACH(const String& instance, arrclone) { + BOOST_FOREACH(const Value& instance, arrclone) { String name = rule.GetName(); if (!rule.GetFKVar().IsEmpty()) { diff --git a/lib/icinga/service-apply.cpp b/lib/icinga/service-apply.cpp index 8e28a5078..167abd0a0 100644 --- a/lib/icinga/service-apply.cpp +++ b/lib/icinga/service-apply.cpp @@ -109,7 +109,7 @@ bool Service::EvaluateApplyRule(const Host::Ptr& host, const ApplyRule& rule) Array::Ptr arrclone = arr->ShallowClone(); ObjectLock olock(arrclone); - BOOST_FOREACH(const String& instance, arrclone) { + BOOST_FOREACH(const Value& instance, arrclone) { String name = rule.GetName(); if (!rule.GetFKVar().IsEmpty()) {