summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/acl/AclValidator.cpp
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2010-04-27 02:19:54 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2010-04-27 02:19:54 +0000
commit5b97122c840fabe27cbf7a3cc2e64823c58d2cb0 (patch)
tree5e7ab2229c2006c5f179361d6f949055a0350bf7 /cpp/src/qpid/acl/AclValidator.cpp
parent41cbf861df97e379210ecf0750ec9039bf941dd1 (diff)
downloadqpid-python-5b97122c840fabe27cbf7a3cc2e64823c58d2cb0.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/acl/AclValidator.cpp')
-rw-r--r--cpp/src/qpid/acl/AclValidator.cpp25
1 files changed, 14 insertions, 11 deletions
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<AclData> 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<const std::string, qpid::acl::AclData::RuleSet>& rules){
+void AclValidator::validateRuleSet(std::pair<const std::string, qpid::acl::AclData::ruleSet>& 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));