summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-08-28 12:41:14 +0000
committerGordon Sim <gsim@apache.org>2013-08-28 12:41:14 +0000
commitaa1a31f789ac361914b3859c0e0b7652955f1caf (patch)
tree4dbede5e5b9b7517bcc6a4b41646da169176dc20 /qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
parentfbce7862734672ca94d3db7e9a74e3292cc18afb (diff)
downloadqpid-python-aa1a31f789ac361914b3859c0e0b7652955f1caf.tar.gz
QPID-4670: Move to proton 0.5, remove dummy string in address for dynamic nodes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1518180 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp b/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
index 68ff979aa4..eb18582b4e 100644
--- a/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
+++ b/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
@@ -118,20 +118,19 @@ void OutgoingFromQueue::handle(pn_delivery_t* delivery)
if (r.disposition) {
switch (r.disposition) {
case PN_ACCEPTED:
- //TODO: only if consuming
- queue->dequeue(0, r.cursor);
+ if (preAcquires()) queue->dequeue(0, r.cursor);
outgoingMessageAccepted();
break;
case PN_REJECTED:
- queue->reject(r.cursor);
+ if (preAcquires()) queue->reject(r.cursor);
outgoingMessageRejected();
break;
case PN_RELEASED:
- queue->release(r.cursor, false);//TODO: for PN_RELEASED, delivery count should not be incremented
+ if (preAcquires()) queue->release(r.cursor, false);//TODO: for PN_RELEASED, delivery count should not be incremented
outgoingMessageRejected();//TODO: not quite true...
break;
case PN_MODIFIED:
- queue->release(r.cursor, true);//TODO: proper handling of modified
+ if (preAcquires()) queue->release(r.cursor, true);//TODO: proper handling of modified
outgoingMessageRejected();//TODO: not quite true...
break;
default: