You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2013/07/22 23:34:14 UTC
svn commit: r1505823 -
/qpid/trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
Author: chug
Date: Mon Jul 22 21:34:14 2013
New Revision: 1505823
URL: http://svn.apache.org/r1505823
Log:
QPID-5011: C++ Broker ACL allows one connection when user quota is zero
Compute limit-check result even for first connection.
Modified:
qpid/trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp?rev=1505823&r1=1505822&r2=1505823&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp Mon Jul 22 21:34:14 2013
@@ -102,10 +102,12 @@ bool ConnectionCounter::countConnectionL
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
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org