diff options
| author | Gordon Sim <gsim@apache.org> | 2009-08-26 16:55:43 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2009-08-26 16:55:43 +0000 |
| commit | c221b394fb6f23d96a25f388aee00b19d6bb9b8b (patch) | |
| tree | 009b4286c565de8ea17ef79bd645a9bd6b1e95e9 /cpp/src/qpid/client/amqp0_10/SessionImpl.cpp | |
| parent | a1c0e020f8ab7889bd6d509e45f6801bab4bd001 (diff) | |
| download | qpid-python-c221b394fb6f23d96a25f388aee00b19d6bb9b8b.tar.gz | |
Hide internal message ID behind API
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@808121 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/amqp0_10/SessionImpl.cpp')
| -rw-r--r-- | cpp/src/qpid/client/amqp0_10/SessionImpl.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp index 9ea2a9f598..e069520e95 100644 --- a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp +++ b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp @@ -29,6 +29,7 @@ #include "qpid/messaging/Address.h" #include "qpid/messaging/Filter.h" #include "qpid/messaging/Message.h" +#include "qpid/messaging/MessageImpl.h" #include "qpid/messaging/MessageListener.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Receiver.h" @@ -39,6 +40,7 @@ #include <boost/intrusive_ptr.hpp> using qpid::messaging::Filter; +using qpid::messaging::MessageImplAccess; using qpid::messaging::Sender; using qpid::messaging::Receiver; using qpid::messaging::VariantMap; @@ -78,16 +80,8 @@ void SessionImpl::acknowledge() 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... - - // [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); + set.add(MessageImplAccess::get(m).getInternalId()); session.messageReject(set); } |
