diff options
| author | Alan Conway <aconway@apache.org> | 2007-11-01 00:38:58 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-11-01 00:38:58 +0000 |
| commit | d4838b1db929de6d650b7cdf574c04425c01b38d (patch) | |
| tree | d519ff7d639f6f1bca111bc12930abf1da405e67 /cpp/src/qpid/broker/SessionHandler.cpp | |
| parent | af6457122a32f1f5a0224fc54f3d0c24377510e3 (diff) | |
| download | qpid-python-d4838b1db929de6d650b7cdf574c04425c01b38d.tar.gz | |
Preparation for session thread safety overhaul:
- simplified SessionState, responsibility for protocol states now in Handlers
- qpid::RefCounted, qpid::intrusive_ptr reference counting support.
- build boost unit tests as single exe, speeds up testing.
- fixed leak in AsynchIOAcceptor.cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@590869 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionHandler.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SessionHandler.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cpp/src/qpid/broker/SessionHandler.cpp b/cpp/src/qpid/broker/SessionHandler.cpp index 0dafcba7bd..f72c52c809 100644 --- a/cpp/src/qpid/broker/SessionHandler.cpp +++ b/cpp/src/qpid/broker/SessionHandler.cpp @@ -38,8 +38,7 @@ SessionHandler::SessionHandler(Connection& c, ChannelId ch) connection(c), channel(ch, &c.getOutput()), proxy(out), // Via my own handleOut() for L2 data. peerSession(channel), // Direct to channel for L2 commands. - ignoring(false), - resuming(false) {} + ignoring(false) {} SessionHandler::~SessionHandler() {} @@ -117,8 +116,7 @@ void SessionHandler::resume(const Uuid& id) { assertClosed("resume"); session = connection.broker.getSessionManager().resume(id); session->attach(*this); - resuming=true; - SequenceNumber seq = session->sendingAck(); + SequenceNumber seq = session->resuming(); peerSession.attached(session->getId(), session->getTimeout()); proxy.getSession().ack(seq, SequenceNumberSet()); } @@ -171,8 +169,7 @@ void SessionHandler::ack(uint32_t cumulativeSeenMark, const SequenceNumberSet& /*seenFrameSet*/) { assertAttached("ack"); - if (resuming) { - resuming=false; + if (session->getState() == SessionState::RESUMING) { session->receivedAck(cumulativeSeenMark); framing::SessionState::Replay replay=session->replay(); std::for_each(replay.begin(), replay.end(), |
