diff options
| author | Charles E. Rolke <chug@apache.org> | 2012-10-17 15:36:05 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2012-10-17 15:36:05 +0000 |
| commit | 124f1897eaf696caec448394e5769fe2c0b8d82a (patch) | |
| tree | 889ac9fa286a550e21d2f8e4bc609ce7b854b001 /cpp/src/qpid | |
| parent | 1fa6c1b8e6a0cd2afafe20193b7277ceff230e18 (diff) | |
| download | qpid-python-124f1897eaf696caec448394e5769fe2c0b8d82a.tar.gz | |
QPID-4373 fix ambiguous CLI args; restore C++ broker schema property
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1399311 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/acl/Acl.h | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/acl/AclPlugin.cpp | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/AclModule.h | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/Broker.cpp | 6 |
4 files changed, 14 insertions, 2 deletions
diff --git a/cpp/src/qpid/acl/Acl.h b/cpp/src/qpid/acl/Acl.h index 28cbfb8f3f..ea3c6586a3 100644 --- a/cpp/src/qpid/acl/Acl.h +++ b/cpp/src/qpid/acl/Acl.h @@ -81,6 +81,10 @@ public: return transferAcl; }; + inline virtual uint16_t getMaxConnectTotal() { + return aclValues.aclMaxConnectTotal; + }; + // create specilied authorise methods for cases that need faster matching as needed. virtual bool authorise( const std::string& id, diff --git a/cpp/src/qpid/acl/AclPlugin.cpp b/cpp/src/qpid/acl/AclPlugin.cpp index 4aaa00a8b0..c3cc92ba88 100644 --- a/cpp/src/qpid/acl/AclPlugin.cpp +++ b/cpp/src/qpid/acl/AclPlugin.cpp @@ -43,8 +43,8 @@ struct AclOptions : public Options { addOptions() ("acl-file", optValue(values.aclFile, "FILE"), "The policy file to load from, loaded from data dir") ("max-connections" , optValue(values.aclMaxConnectTotal, "N"), "The maximum combined number of connections allowed. 0 implies no limit.") - ("max-connections-per-user", optValue(values.aclMaxConnectPerUser, "N"), "The maximum number of connections allowed per user. 0 implies no limit.") - ("max-connections-per-ip" , optValue(values.aclMaxConnectPerIp, "N"), "The maximum number of connections allowed per host IP address. 0 implies no limit.") + ("limit-connections-per-user", optValue(values.aclMaxConnectPerUser, "N"), "The maximum number of connections allowed per user. 0 implies no limit.") + ("limit-connections-per-ip" , optValue(values.aclMaxConnectPerIp, "N"), "The maximum number of connections allowed per host IP address. 0 implies no limit.") ("max-queues-per-user", optValue(values.aclMaxQueuesPerUser, "N"), "The maximum number of queues allowed per user. 0 implies no limit.") ; } diff --git a/cpp/src/qpid/broker/AclModule.h b/cpp/src/qpid/broker/AclModule.h index d8b80fc39c..c01697ace9 100644 --- a/cpp/src/qpid/broker/AclModule.h +++ b/cpp/src/qpid/broker/AclModule.h @@ -132,6 +132,8 @@ namespace broker { // doTransferAcl pervents time consuming ACL calls on a per-message basis. virtual bool doTransferAcl()=0; + virtual uint16_t getMaxConnectTotal()=0; + virtual bool authorise( const std::string& id, const acl::Action& action, diff --git a/cpp/src/qpid/broker/Broker.cpp b/cpp/src/qpid/broker/Broker.cpp index 0c466aea07..784530b9ab 100644 --- a/cpp/src/qpid/broker/Broker.cpp +++ b/cpp/src/qpid/broker/Broker.cpp @@ -351,6 +351,12 @@ Broker::Broker(const Broker::Options& conf) : // Initialize plugins Plugin::initializeAll(*this); + if(conf.enableMgmt) { + if (getAcl()) { + mgmtObject->set_maxConns(getAcl()->getMaxConnectTotal()); + } + } + if (managementAgent.get()) managementAgent->pluginsInitialized(); if (conf.queueCleanInterval) { |
