diff options
| author | Charles E. Rolke <chug@apache.org> | 2013-07-22 21:34:14 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2013-07-22 21:34:14 +0000 |
| commit | 2bbc8a70819ad4075a950b34fc65bc10a3c28951 (patch) | |
| tree | fd1d318f94caf004d59d050711f666cf565e51c1 /qpid/cpp | |
| parent | d2f3caa7409b95cfcd93de3057b07eecf8b12548 (diff) | |
| download | qpid-python-2bbc8a70819ad4075a950b34fc65bc10a3c28951.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@1505823 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp b/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp index 3d703066b4..7a5d0ab53d 100644 --- a/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp +++ b/qpid/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 |
