diff options
Diffstat (limited to 'qpid/cpp/src')
| -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) { |
