summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/client/amqp0_10/SessionImpl.cpp')
-rw-r--r--cpp/src/qpid/client/amqp0_10/SessionImpl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
index 647ace5f92..9ea2a9f598 100644
--- a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
+++ b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
@@ -79,7 +79,13 @@ void SessionImpl::reject(qpid::messaging::Message& m)
{
qpid::sys::Mutex::ScopedLock l(lock);
//TODO: how do I get the id of the original transfer command? think this through some more...
- SequenceNumber id(reinterpret_cast<uint32_t>(m.getInternalId()));
+
+ // [tross] The following hack was added to get this code to compile on a 64-bit machine.
+ // It should be functionally equivalent to the original on a 32-bit architecture
+ // but is almost certainly not what was intended by the author.
+ uint64_t rawId(reinterpret_cast<uint64_t>(m.getInternalId()));
+ SequenceNumber id((uint32_t) ((rawId & 0xFFFFFFFF) ^ ((rawId >> 32) & 0xFFFFFFFF)));
+
SequenceSet set;
set.add(id);
session.messageReject(set);