summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2013-07-22 21:34:14 +0000
committerCharles E. Rolke <chug@apache.org>2013-07-22 21:34:14 +0000
commit48edc22eb5ffe563a70157899b7377fdc300039a (patch)
tree7a4accf343d7ebf73ea3fc44a669c00d7b9ae93c /cpp
parentf2ed1000e7f34ea8fbbdb8c9e1d245a1fd767e92 (diff)
downloadqpid-python-48edc22eb5ffe563a70157899b7377fdc300039a.tar.gz
QPID-5011: C++ Broker ACL allows one connection when user quota is zero
Compute limit-check result even for first connection. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1505823 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/acl/AclConnectionCounter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/acl/AclConnectionCounter.cpp b/cpp/src/qpid/acl/AclConnectionCounter.cpp
index 3d703066b4..7a5d0ab53d 100644
--- a/cpp/src/qpid/acl/AclConnectionCounter.cpp
+++ b/cpp/src/qpid/acl/AclConnectionCounter.cpp
@@ -102,10 +102,12 @@ bool ConnectionCounter::countConnectionLH(
if (eRef != theMap.end()) {
count = (uint16_t)(*eRef).second + 1;
(*eRef).second = count;
- result = (enforceLimit ? count <= theLimit : true);
} else {
theMap[theName] = count = 1;
}
+ if (enforceLimit) {
+ result = count <= theLimit;
+ }
if (emitLog) {
QPID_LOG(trace, "ACL ConnectionApprover user=" << theName
<< " limit=" << theLimit