summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2014-04-30 03:41:23 +0000
committerAndrew Stitcher <astitcher@apache.org>2014-04-30 03:41:23 +0000
commitad03e768f64f38489cfc4f8520cfbc1740317133 (patch)
tree7253a7c8632cba6fd8dffdd72089fa8091b04975 /qpid/cpp
parentae71aa7102a41735e49ec5c98409bc69fffd9a8f (diff)
downloadqpid-python-ad03e768f64f38489cfc4f8520cfbc1740317133.tar.gz
QPID-5735: Correct calculation of amqp.redelivered
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1591183 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/Selector.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/Selector.cpp b/qpid/cpp/src/qpid/broker/Selector.cpp
index 40a0f019ab..b9888b4cd4 100644
--- a/qpid/cpp/src/qpid/broker/Selector.cpp
+++ b/qpid/cpp/src/qpid/broker/Selector.cpp
@@ -92,7 +92,9 @@ const Value MessageSelectorEnv::specialValue(const string& id) const
if ( id=="delivery_mode" ) {
v = msg.getEncoding().isPersistent() ? PERSISTENT : NON_PERSISTENT;
} else if ( id=="redelivered" ) {
- v = msg.getDeliveryCount()>0 ? true : false;
+ // Although redelivered is defined to be true delivery-count>0 if it is 0 now
+ // it will be 1 by the time the message is delivered
+ v = msg.getDeliveryCount()>=0 ? true : false;
} else if ( id=="priority" ) {
v = int64_t(msg.getPriority());
} else if ( id=="correlation_id" ) {