diff options
| author | Alan Conway <aconway@apache.org> | 2008-06-13 17:36:23 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-06-13 17:36:23 +0000 |
| commit | 0a99f79e0d90f0d1c0836fbef124bfe269677840 (patch) | |
| tree | 1a6ee2ce409947d5a6956411483e9182e0f76a0c /cpp/src/qpid/amqp_0_10/SessionHandler.cpp | |
| parent | 34cdb55ef0a755be5f0bbd965418b11e08e86031 (diff) | |
| download | qpid-python-0a99f79e0d90f0d1c0836fbef124bfe269677840.tar.gz | |
Fix for broker wraparound problem.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@667603 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/amqp_0_10/SessionHandler.cpp')
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/SessionHandler.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp index fa05cee1b3..35587940e5 100644 --- a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp +++ b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp @@ -75,6 +75,8 @@ void SessionHandler::handleIn(AMQFrame& f) { throw IllegalStateException(QPID_MSG(getState()->getId() << ": Not ready to receive data")); if (!getState()->receiverRecord(f)) return; // Ignore duplicates. + if (getState()->receiverNeedKnownCompleted()) + sendCompletion(); getInHandler()->handle(f); } } @@ -94,13 +96,22 @@ void SessionHandler::handleIn(AMQFrame& f) { } } +namespace { +bool isControl(const AMQFrame& f) { + return f.getMethod() && f.getMethod()->type() == framing::CONTROL; +} +bool isCommand(const AMQFrame& f) { + return f.getMethod() && f.getMethod()->type() == framing::COMMAND; +} +} // namespace + void SessionHandler::handleOut(AMQFrame& f) { checkAttached(); if (!sendReady) throw IllegalStateException(QPID_MSG(getState()->getId() << ": Not ready to send data")); getState()->senderRecord(f); - if (getState()->senderNeedFlush()) { - peer.flush(false, true, true); + if (isCommand(f) && getState()->senderNeedFlush()) { + peer.flush(false, false, true); getState()->senderRecordFlush(); } channel.handle(f); |
