Author: gsim
Date: Mon Mar 23 09:12:34 2009
New Revision: 757358
URL: http://svn.apache.org/viewvc?rev=757358&view=rev
Log:
Prevent values lower than 3 being used for the experimental --cluster-read-max
option.
Modified:
qpid/branches/0.5-release/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp
Modified: qpid/branches/0.5-release/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp
URL:
http://svn.apache.org/viewvc/qpid/branches/0.5-release/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp?rev=757358&r1=757357&r2=757358&view=diff
==============================================================================
--- qpid/branches/0.5-release/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp
(original)
+++ qpid/branches/0.5-release/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp Mon
Mar 23 09:12:34 2009
@@ -134,6 +134,11 @@
if (settings.name.empty()) return; // Only if --cluster-name option
was specified.
Broker* broker = dynamic_cast<Broker*>(&target);
if (!broker) return;
+ if (settings.readMax < 3) {
+ QPID_LOG(notice, "invalid value for cluster-read-max: " <<
settings.readMax << ", setting to 3");
+ settings.readMax = 3;//prevent lower values being used as they are
unsafe
+ }
+
cluster = new Cluster(settings, *broker);
broker->setConnectionFactory(
boost::shared_ptr<sys::ConnectionCodec::Factory>(
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]