summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2015-01-19 14:12:54 +0000
committerGordon Sim <gsim@apache.org>2015-01-19 14:12:54 +0000
commite459d2c4c0073217cdd7cd5b73e3aecee0c06ca8 (patch)
treee3b2e05c5225f9f24f0318b85a3cbda32fc458a0 /qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
parent2e7cc144d9ce84301ad5d9c3f868eb0f4ea03822 (diff)
downloadqpid-python-e459d2c4c0073217cdd7cd5b73e3aecee0c06ca8.tar.gz
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
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, 9 insertions, 0 deletions
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<char*>(t.start)/*won't ever be written to*/, t.size);
+#else
qpid::framing::Buffer buffer(const_cast<char*>(t.bytes)/*won't ever be written to*/, t.size);
+#endif
return (size_t) buffer.getLong();
}