summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp')
-rw-r--r--qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp b/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
index 9715c472c1..5a70c569a7 100644
--- a/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
+++ b/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
@@ -20,6 +20,7 @@
*/
#include "AclConnectionCounter.h"
+#include "Acl.h"
#include "qpid/broker/Connection.h"
#include "qpid/log/Statement.h"
#include "qpid/sys/Mutex.h"
@@ -40,8 +41,8 @@ namespace acl {
//
//
//
-ConnectionCounter::ConnectionCounter(uint32_t nl, uint32_t hl) :
- nameLimit(nl), hostLimit(hl) {}
+ConnectionCounter::ConnectionCounter(Acl& a, uint32_t nl, uint32_t hl) :
+ acl(a), nameLimit(nl), hostLimit(hl) {}
ConnectionCounter::~ConnectionCounter() {}
@@ -131,7 +132,8 @@ void ConnectionCounter::opened(broker::Connection& connection) {
if (!nameOk) {
// User has too many
- QPID_LOG(info, "ACL ConnectionCounter User '" << userName
+ acl.reportConnectLimit(userName, hostName);
+ QPID_LOG(notice, "ACL ConnectionCounter User '" << userName
<< "' exceeded maximum allowed connections");
throw Exception(
QPID_MSG("User '" << userName
@@ -140,7 +142,8 @@ void ConnectionCounter::opened(broker::Connection& connection) {
if (!hostOk) {
// Host has too many
- QPID_LOG(info, "ACL ConnectionCounter Client host '" << hostName
+ acl.reportConnectLimit(userName, hostName);
+ QPID_LOG(notice, "ACL ConnectionCounter Client host '" << hostName
<< "' exceeded maximum allowed connections");
throw Exception(
QPID_MSG("Client host '" << hostName