summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2011-04-01 12:05:04 +0000
committerGordon Sim <gsim@apache.org>2011-04-01 12:05:04 +0000
commitafc8efa8d43810a4efb2fbcab560279dbeeab0a9 (patch)
treeffd76ea78d1843454695ef300aec6d4725bef51d /cpp
parentabd02052dd4adfefd8b39e326c0a810b1c0ac460 (diff)
downloadqpid-python-afc8efa8d43810a4efb2fbcab560279dbeeab0a9.tar.gz
QPID-3180: fix ring queues for the case where max size is 0 (implying infinite size)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1087669 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/broker/QueuePolicy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/QueuePolicy.cpp b/cpp/src/qpid/broker/QueuePolicy.cpp
index b39ea3614b..a93a6332fd 100644
--- a/cpp/src/qpid/broker/QueuePolicy.cpp
+++ b/cpp/src/qpid/broker/QueuePolicy.cpp
@@ -246,7 +246,7 @@ bool RingQueuePolicy::checkLimit(boost::intrusive_ptr<Message> m)
{
// If the message is bigger than the queue size, give up
- if (m->contentSize() > getMaxSize()) {
+ if (getMaxSize() && m->contentSize() > getMaxSize()) {
QPID_LOG(debug, "Message too large for ring queue " << name
<< " [" << *this << "] "
<< ": message size = " << m->contentSize() << " bytes"