diff options
| author | Gordon Sim <gsim@apache.org> | 2013-10-01 11:31:33 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-10-01 11:31:33 +0000 |
| commit | e3d9bcdceecfaf359a4f3c82b11b25c8916ed0a6 (patch) | |
| tree | 4fcf404e96cc51e90a37b9ee30b44336abdbfa84 /qpid/cpp | |
| parent | 22acad9dbf3230f2fe4181d73e348907fa20ed8c (diff) | |
| download | qpid-python-e3d9bcdceecfaf359a4f3c82b11b25c8916ed0a6.tar.gz | |
QPID-5200: Allow size limit to be disabled
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1528044 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.cpp | 10 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/broker/QueueSettings.cpp | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index d9d6781c9f..25b4e23968 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -131,7 +131,15 @@ inline void mgntDeqStats(const Message& msg, QueueSettings merge(const QueueSettings& inputs, const Broker::Options& globalOptions) { QueueSettings settings(inputs); - if (!settings.maxDepth.hasSize() && globalOptions.queueLimit) { + settings.maxDepth = QueueDepth(); + if (inputs.maxDepth.hasCount() && inputs.maxDepth.getCount()) { + settings.maxDepth.setCount(inputs.maxDepth.getCount()); + } + if (inputs.maxDepth.hasSize()) { + if (inputs.maxDepth.getSize()) { + settings.maxDepth.setSize(inputs.maxDepth.getSize()); + } + } else if (globalOptions.queueLimit) { settings.maxDepth.setSize(globalOptions.queueLimit); } return settings; diff --git a/qpid/cpp/src/qpid/broker/QueueSettings.cpp b/qpid/cpp/src/qpid/broker/QueueSettings.cpp index c505217dbb..0b4a268489 100644 --- a/qpid/cpp/src/qpid/broker/QueueSettings.cpp +++ b/qpid/cpp/src/qpid/broker/QueueSettings.cpp @@ -112,10 +112,10 @@ QueueSettings::QueueSettings(bool d, bool a) : bool QueueSettings::handle(const std::string& key, const qpid::types::Variant& value) { - if (key == MAX_COUNT && value.asUint32() > 0) { + if (key == MAX_COUNT) { maxDepth.setCount(value); return true; - } else if (key == MAX_SIZE && value.asUint64() > 0) { + } else if (key == MAX_SIZE) { maxDepth.setSize(value); return true; } else if (key == POLICY_TYPE) { |
