qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1528044 - in /qpid/trunk/qpid/cpp/src/qpid/broker: Queue.cpp QueueSettings.cpp
Date Tue, 01 Oct 2013 11:31:34 GMT
Author: gsim
Date: Tue Oct  1 11:31:33 2013
New Revision: 1528044

URL: http://svn.apache.org/r1528044
Log:
QPID-5200: Allow size limit to be disabled

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/QueueSettings.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp?rev=1528044&r1=1528043&r2=1528044&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp Tue Oct  1 11:31:33 2013
@@ -131,7 +131,15 @@ inline void mgntDeqStats(const Message& 
 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;

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/QueueSettings.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/QueueSettings.cpp?rev=1528044&r1=1528043&r2=1528044&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/QueueSettings.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/QueueSettings.cpp Tue Oct  1 11:31:33 2013
@@ -112,10 +112,10 @@ QueueSettings::QueueSettings(bool d, boo
 
 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) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message