From 0f84b52d3d83d522cdd1242cce5bffca8ee74f2a Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 14 Apr 2008 21:11:25 +0000 Subject: * Fix interpretation of accept-mode, 0 == EXPLICIT * Ensure accepts are taken into account in command sequence git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@647999 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/MessageAdapter.cpp | 2 +- cpp/src/qpid/broker/SessionState.cpp | 1 + python/qpid/session.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/src/qpid/broker/MessageAdapter.cpp b/cpp/src/qpid/broker/MessageAdapter.cpp index ea2882b474..0e99d923d4 100644 --- a/cpp/src/qpid/broker/MessageAdapter.cpp +++ b/cpp/src/qpid/broker/MessageAdapter.cpp @@ -60,7 +60,7 @@ namespace broker{ bool TransferAdapter::requiresAccept(const framing::FrameSet& f) { const framing::Message010TransferBody* b = f.as(); - return b && b->getAcceptMode(); + return b && b->getAcceptMode() == 0/*EXPLICIT == 0*/; } std::string PreviewAdapter::getExchange(const framing::FrameSet& f) diff --git a/cpp/src/qpid/broker/SessionState.cpp b/cpp/src/qpid/broker/SessionState.cpp index d719bbe145..64d62934b9 100644 --- a/cpp/src/qpid/broker/SessionState.cpp +++ b/cpp/src/qpid/broker/SessionState.cpp @@ -230,6 +230,7 @@ void SessionState::enqueued(boost::intrusive_ptr msg) { completed.add(msg->getCommandId()); if (msg->requiresAccept()) { + nextOut++;//accept is a command, so the counter must be incremented getProxy().getMessage010().accept(SequenceSet(msg->getCommandId())); } } diff --git a/python/qpid/session.py b/python/qpid/session.py index bbe2b326d6..427a403b90 100644 --- a/python/qpid/session.py +++ b/python/qpid/session.py @@ -281,6 +281,9 @@ class Delegate: def __init__(self, session): self.session = session + #XXX: do something with incoming accepts + def message_accept(self, ma): None + def execution_result(self, er): future = self.session.results.pop(er.command_id) future.set(er.value) -- cgit v1.2.1