summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2012-03-29 18:53:28 +0000
committerCharles E. Rolke <chug@apache.org>2012-03-29 18:53:28 +0000
commitae9493a91afe1d12f11ef61e6744264447f41f9e (patch)
treea9dbf4747f960e56e47c4c9324a950dbdff97444
parent129dc4c55dd793f6dc51cdeefecc5bce6009e50d (diff)
downloadqpid-python-ae9493a91afe1d12f11ef61e6744264447f41f9e.tar.gz
QPID-3799 C++ broker ACL improvements.
In publish lookups add rule text to log output and print routing keys as expected. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1307048 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/acl/AclData.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/acl/AclData.cpp b/qpid/cpp/src/qpid/acl/AclData.cpp
index 03a8a19db9..da7f240a9b 100644
--- a/qpid/cpp/src/qpid/acl/AclData.cpp
+++ b/qpid/cpp/src/qpid/acl/AclData.cpp
@@ -60,7 +60,7 @@ namespace acl {
// matchProp
//
// Compare a rule's property name with a lookup name,
- // The rule's name may contains a trailing '*' to specify a wildcard match.
+ // The rule's name may contain a trailing '*' to specify a wildcard match.
//
bool AclData::matchProp(const std::string& ruleStr,
const std::string& lookupStr)
@@ -312,14 +312,14 @@ namespace acl {
const Action& action,
const ObjectType& objType,
const std::string& /*Exchange*/ name,
- const std::string& RoutingKey)
+ const std::string& routingKey)
{
QPID_LOG(debug, "ACL: Lookup for id:" << id
<< " action:" << AclHelper::getActionStr((Action) action)
<< " objectType:" << AclHelper::getObjectTypeStr((ObjectType) objType)
<< " exchange name:" << name
- << " with routing key " << RoutingKey);
+ << " with routing key " << routingKey);
AclResult aclresult = decisionMode;
@@ -337,6 +337,8 @@ namespace acl {
{
rsItr--;
+ QPID_LOG(debug, "ACL: checking rule " << rsItr->toString());
+
// loop the names looking for match
bool match =true;
for (specPropertyMapItr pMItr = rsItr->props.begin();
@@ -364,17 +366,17 @@ namespace acl {
break;
case acl::SPECPROP_ROUTINGKEY:
- if (matchProp(pMItr->second, RoutingKey))
+ if (matchProp(pMItr->second, routingKey))
{
QPID_LOG(debug, "ACL: lookup key name '"
- << name << "' matched with rule routing key '"
+ << routingKey << "' matched with rule routing key '"
<< pMItr->second << "'");
}
else
{
match= false;
QPID_LOG(debug, "ACL: lookup key name '"
- << name << "' did not match with rule routing key '"
+ << routingKey << "' did not match with rule routing key '"
<< pMItr->second << "'");
}
break;