You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2008/05/29 13:45:30 UTC
svn commit: r661302 - in /incubator/qpid/trunk/qpid/cpp/src:
qpid/SessionState.cpp tests/SessionState.cpp
Author: gsim
Date: Thu May 29 04:45:29 2008
New Revision: 661302
URL: http://svn.apache.org/viewvc?rev=661302&view=rev
Log:
Only record frames for replay if timeout is non-zero.
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/SessionState.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/SessionState.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/SessionState.cpp?rev=661302&r1=661301&r2=661302&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/SessionState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/SessionState.cpp Thu May 29 04:45:29 2008
@@ -110,13 +110,13 @@
if (isControl(f)) return; // Ignore control frames.
QPID_LOG_IF(debug, f.getMethod(), getId() << ": sent cmd " << sender.sendPoint.command << ": " << *f.getMethod());
stateful = true;
- sender.replayList.push_back(f);
+ if (timeout) sender.replayList.push_back(f);
sender.unflushedSize += 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 bufffer exceeeded hard limit");
+ throw ResourceLimitExceededException("Replay buffer exceeeded hard limit");
}
bool SessionState::senderNeedFlush() const {
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp?rev=661302&r1=661301&r2=661302&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp Thu May 29 04:45:29 2008
@@ -127,6 +127,7 @@
QPID_AUTO_TEST_CASE(testSendGetReplyList) {
qpid::SessionState s;
+ s.setTimeout(1);
s.senderGetCommandPoint();
transfer1(s, "abc");
transfers(s, "def");
@@ -142,6 +143,7 @@
// sync after 2 1-byte transfers or equivalent bytes.
c.replayFlushLimit = 2*(transferFrameSize()+contentFrameSize());
qpid::SessionState s(SessionId(), c);
+ s.setTimeout(1);
s.senderGetCommandPoint();
transfers(s, "a");
BOOST_CHECK(!s.senderNeedFlush());
@@ -161,6 +163,7 @@
// sync after 2 1-byte transfers or equivalent bytes.
c.replayFlushLimit = 2*(transferFrameSize()+contentFrameSize());
qpid::SessionState s(SessionId(), c);
+ s.setTimeout(1);
s.senderGetCommandPoint();
transfers(s, "ab");
BOOST_CHECK(s.senderNeedFlush());
@@ -191,6 +194,7 @@
QPID_AUTO_TEST_CASE(testPeerCompleted) {
qpid::SessionState s;
+ s.setTimeout(1);
s.senderGetCommandPoint();
// Completion implies confirmation
transfers(s, "abc");