diff options
author | Gordon Sim <gsim@apache.org> | 2008-03-27 18:04:42 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-03-27 18:04:42 +0000 |
commit | f9380575ddccbe48edd5305e96db70892c1dc1aa (patch) | |
tree | bf4361ed80e1ad3c3d2aca4a345c8d0b49d5d642 /cpp/src/qpid/broker/MessageAdapter.cpp | |
parent | 719c2529a14527c236e871603136ccbe44f632d3 (diff) | |
download | qpid-python-f9380575ddccbe48edd5305e96db70892c1dc1aa.tar.gz |
Send accept in response to message publications if required.
Hold up completion (and accept) until message from transfer is fully enqueued.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@641929 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/MessageAdapter.cpp')
-rw-r--r-- | cpp/src/qpid/broker/MessageAdapter.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/MessageAdapter.cpp b/cpp/src/qpid/broker/MessageAdapter.cpp index d54f30ff72..ea2882b474 100644 --- a/cpp/src/qpid/broker/MessageAdapter.cpp +++ b/cpp/src/qpid/broker/MessageAdapter.cpp @@ -53,10 +53,16 @@ namespace broker{ bool TransferAdapter::isPersistent(const framing::FrameSet& f) { - const framing::DeliveryProperties* p = f.getHeaders()->get<framing::DeliveryProperties>(); + const framing::DeliveryProperties010* p = f.getHeaders()->get<framing::DeliveryProperties010>(); return p && p->getDeliveryMode() == 2; } + bool TransferAdapter::requiresAccept(const framing::FrameSet& f) + { + const framing::Message010TransferBody* b = f.as<framing::Message010TransferBody>(); + return b && b->getAcceptMode(); + } + std::string PreviewAdapter::getExchange(const framing::FrameSet& f) { return f.as<framing::MessageTransferBody>()->getDestination(); @@ -74,4 +80,10 @@ namespace broker{ return p ? &(p->getApplicationHeaders()) : 0; } + bool PreviewAdapter::isPersistent(const framing::FrameSet& f) + { + const framing::DeliveryProperties* p = f.getHeaders()->get<framing::DeliveryProperties>(); + return p && p->getDeliveryMode() == 2; + } + }} |