summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2014-10-27 17:00:41 +0000
committerGordon Sim <gsim@apache.org>2014-10-27 17:00:41 +0000
commit02fb5003ae7c0d9a517f5a4ee530e2b9401c6c59 (patch)
tree3b14601527b2b73f67eeb76f7a4a3908d9948088 /qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
parentbf0436b096c63baf69555a5528f7afd4f5717dbb (diff)
downloadqpid-python-02fb5003ae7c0d9a517f5a4ee530e2b9401c6c59.tar.gz
QPID-4710: Initial support for broker side AMQP 1.0 local transactions (single txn per session, single session per txn to begin with)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1634598 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.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp b/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
index ba073c8a36..54993d071e 100644
--- a/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
+++ b/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
@@ -112,6 +112,12 @@ void OutgoingFromQueue::handle(pn_delivery_t* delivery)
if (pn_delivery_updated(delivery)) {
assert(r.delivery == delivery);
r.disposition = pn_delivery_remote_state(delivery);
+
+ std::pair<TxBuffer*,uint64_t> txn = session.getTransactionalState(delivery);
+ if (txn.first) {
+ r.disposition = txn.second;
+ }
+
if (!r.disposition && pn_delivery_settled(delivery)) {
//if peer has settled without setting state, assume accepted
r.disposition = PN_ACCEPTED;
@@ -119,7 +125,7 @@ void OutgoingFromQueue::handle(pn_delivery_t* delivery)
if (r.disposition) {
switch (r.disposition) {
case PN_ACCEPTED:
- if (preAcquires()) queue->dequeue(0, r.cursor);
+ if (preAcquires()) queue->dequeue(r.cursor, txn.first);
outgoingMessageAccepted();
break;
case PN_REJECTED: