[icinga-checkins] icinga.org: icinga2/master: Bugfix: %require didn' t work if parent type had a validator for the same attribute.

git at icinga.org git at icinga.org
Wed Feb 6 13:22:43 CET 2013


Module: icinga2
Branch: master
Commit: 07b50ecce8fe468f52a83012d189f07c78cd45fb
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=07b50ecce8fe468f52a83012d189f07c78cd45fb

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Wed Feb  6 13:21:55 2013 +0100

Bugfix: %require didn't work if parent type had a validator for the same attribute.

---

 lib/config/configtype.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/config/configtype.cpp b/lib/config/configtype.cpp
index 55c4087..0c4dfad 100644
--- a/lib/config/configtype.cpp
+++ b/lib/config/configtype.cpp
@@ -147,9 +147,12 @@ void ConfigType::ValidateDictionary(const Dictionary::Ptr& dictionary,
 			if (subRuleList)
 				subRuleLists.push_back(subRuleList);
 
+			if (overallResult == ValidationOK)
+				continue;
+
 			if (result == ValidationOK) {
 				overallResult = result;
-				break;
+				continue;
 			}
 
 			if (result == ValidationInvalidType)





More information about the icinga-checkins mailing list