diff options
| author | Alan Conway <aconway@apache.org> | 2008-06-13 14:36:53 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-06-13 14:36:53 +0000 |
| commit | 3d53654a8d2b213267f4f96abe0bd12cba95b99e (patch) | |
| tree | 54700670622675060bc67b05eeeda80c55f1c37d /qpid/cpp/src | |
| parent | f6be16b15722d43b3e7f1431f076b8d979f504b1 (diff) | |
| download | qpid-python-3d53654a8d2b213267f4f96abe0bd12cba95b99e.tar.gz | |
Revert SessionState changes in r667503.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@667554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/SessionState.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/qpid/cpp/src/qpid/SessionState.cpp b/qpid/cpp/src/qpid/SessionState.cpp index 0ec9acbc4d..9ef2f5f8fb 100644 --- a/qpid/cpp/src/qpid/SessionState.cpp +++ b/qpid/cpp/src/qpid/SessionState.cpp @@ -99,8 +99,6 @@ SequenceSet SessionState::senderGetIncomplete() const { return sender.incomplet SessionPoint SessionState::senderGetReplayPoint() const { return sender.replayPoint; } SessionState::ReplayRange SessionState::senderExpected(const SessionPoint& expect) { - if (timeout == 0) - return SessionState::ReplayRange(); if (expect < sender.replayPoint || sender.sendPoint < expect) throw InvalidArgumentException(QPID_MSG(getId() << ": expected command-point out of range.")); QPID_LOG(debug, getId() << ": sender expected point moved to " << expect); @@ -116,24 +114,22 @@ void SessionState::senderRecord(const AMQFrame& f) { if (isControl(f)) return; // Ignore control frames. QPID_LOG_IF(debug, f.getMethod(), getId() << ": sent cmd " << sender.sendPoint.command << ": " << *f.getMethod()); stateful = true; - if (timeout) { - sender.replayList.push_back(f); - sender.replaySize += f.size(); - sender.unflushedSize += f.size(); - if (config.replayHardLimit && config.replayHardLimit < sender.replaySize) - throw ResourceLimitExceededException("Replay buffer exceeeded hard limit"); - } + if (timeout) sender.replayList.push_back(f); + sender.unflushedSize += f.size(); sender.bytesSinceKnownCompleted += f.size(); + sender.replaySize += f.size(); sender.incomplete += sender.sendPoint.command; sender.sendPoint.advance(f); + if (config.replayHardLimit && config.replayHardLimit < sender.replaySize) + throw ResourceLimitExceededException("Replay buffer exceeeded hard limit"); } bool SessionState::senderNeedFlush() const { - return timeout != 0 && config.replayFlushLimit && sender.unflushedSize >= config.replayFlushLimit; + return config.replayFlushLimit && sender.unflushedSize >= config.replayFlushLimit; } void SessionState::senderRecordFlush() { - if (timeout == 0) return; + assert(sender.flushPoint <= sender.sendPoint); sender.flushPoint = sender.sendPoint; sender.unflushedSize = 0; } @@ -147,7 +143,6 @@ void SessionState::senderRecordKnownCompleted() { } void SessionState::senderConfirmed(const SessionPoint& confirmed) { - if (timeout == 0) return; if (confirmed > sender.sendPoint) throw InvalidArgumentException(QPID_MSG(getId() << "Confirmed commands not yet sent.")); QPID_LOG(debug, getId() << ": sender confirmed point moved to " << confirmed); @@ -163,6 +158,7 @@ void SessionState::senderConfirmed(const SessionPoint& confirmed) { if (sender.replayPoint > sender.flushPoint) sender.flushPoint = sender.replayPoint; sender.replayList.erase(sender.replayList.begin(), i); + assert(sender.replayPoint.offset == 0); } void SessionState::senderCompleted(const SequenceSet& commands) { |
