From e459d2c4c0073217cdd7cd5b73e3aecee0c06ca8 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 19 Jan 2015 14:12:54 +0000 Subject: QPID-6321: handle change to pn_delivery_tag_t in 0.9 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1653005 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp') diff --git a/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp b/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp index d0b41c6c90..0136d5a0ed 100644 --- a/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp +++ b/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp @@ -32,6 +32,7 @@ #include "qpid/framing/Buffer.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" +#include "config.h" namespace qpid { namespace broker { @@ -285,7 +286,11 @@ qpid::broker::OwnershipToken* OutgoingFromQueue::getSession() OutgoingFromQueue::Record::Record() : delivery(0), disposition(0), index(0) { +#ifdef NO_PROTON_DELIVERY_TAG_T + tag.start = tagData; +#else tag.bytes = tagData; +#endif tag.size = TAG_WIDTH; } void OutgoingFromQueue::Record::init(size_t i) @@ -306,7 +311,11 @@ void OutgoingFromQueue::Record::reset() size_t OutgoingFromQueue::Record::getIndex(pn_delivery_tag_t t) { assert(t.size == TAG_WIDTH); +#ifdef NO_PROTON_DELIVERY_TAG_T + qpid::framing::Buffer buffer(const_cast(t.start)/*won't ever be written to*/, t.size); +#else qpid::framing::Buffer buffer(const_cast(t.bytes)/*won't ever be written to*/, t.size); +#endif return (size_t) buffer.getLong(); } -- cgit v1.2.1