From 5b97122c840fabe27cbf7a3cc2e64823c58d2cb0 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Tue, 27 Apr 2010 02:19:54 +0000 Subject: Reverting the change made in rev937119 as it seems to cause a core dump in RHEL5. I haven't managed to pin point the issue. Once I do I may introduce the fix again with the required changes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@938298 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/acl/AclValidator.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'cpp/src/qpid/acl/AclValidator.cpp') diff --git a/cpp/src/qpid/acl/AclValidator.cpp b/cpp/src/qpid/acl/AclValidator.cpp index e2d13fea92..aeaf638f54 100644 --- a/cpp/src/qpid/acl/AclValidator.cpp +++ b/cpp/src/qpid/acl/AclValidator.cpp @@ -104,28 +104,31 @@ AclValidator::~AclValidator(){ /* Iterate through the data model and validate the parameters. */ void AclValidator::validate(boost::shared_ptr d) { + + for (unsigned int cnt=0; cnt< qpid::acl::ACTIONSIZE; cnt++){ - for (unsigned int cnt=0; cnt< qpid::acl::ACTIONSIZE; cnt++){ + if (d->actionList[cnt]){ - for (unsigned int cnt1=0; cnt1< qpid::acl::OBJECTSIZE; cnt1++){ + for (unsigned int cnt1=0; cnt1< qpid::acl::OBJECTSIZE; cnt1++){ - if (!d->actionList[cnt].empty() && !d->actionList[cnt][cnt1].empty()){ - std::for_each(d->actionList[cnt][cnt1].begin(), - d->actionList[cnt][cnt1].end(), - boost::bind(&AclValidator::validateRuleSet, this, _1)); - } - } - } + if (d->actionList[cnt][cnt1]){ + std::for_each(d->actionList[cnt][cnt1]->begin(), + d->actionList[cnt][cnt1]->end(), + boost::bind(&AclValidator::validateRuleSet, this, _1)); + }//if + }//for + }//if + }//for } -void AclValidator::validateRuleSet(std::pair& rules){ +void AclValidator::validateRuleSet(std::pair& rules){ std::for_each(rules.second.begin(), rules.second.end(), boost::bind(&AclValidator::validateRule, this, _1)); } -void AclValidator::validateRule(qpid::acl::AclData::Rule& rule){ +void AclValidator::validateRule(qpid::acl::AclData::rule& rule){ std::for_each(rule.props.begin(), rule.props.end(), boost::bind(&AclValidator::validateProperty, this, _1)); -- cgit v1.2.1