summaryrefslogtreecommitdiff
path: root/cpp/src/tests/SessionState.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-05-23 13:39:07 +0000
committerAlan Conway <aconway@apache.org>2008-05-23 13:39:07 +0000
commit896d94f7c27e958806b96b537a7a96208ede145a (patch)
tree35c139fcc037fde8fef675d9d730882d22781931 /cpp/src/tests/SessionState.cpp
parentbb4584d228b837fa70839560d72bc2a59dc1aa17 (diff)
downloadqpid-python-896d94f7c27e958806b96b537a7a96208ede145a.tar.gz
qpid::SessionState: Added error checking for invalid frame sequences.
client: Fix client crash on error during connection shutdown. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@659538 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/SessionState.cpp')
-rw-r--r--cpp/src/tests/SessionState.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/tests/SessionState.cpp b/cpp/src/tests/SessionState.cpp
index 4beef87cfe..40922b3be8 100644
--- a/cpp/src/tests/SessionState.cpp
+++ b/cpp/src/tests/SessionState.cpp
@@ -65,17 +65,18 @@ string str(const boost::iterator_range<vector<AMQFrame>::const_iterator>& frames
// Make a transfer command frame.
AMQFrame transferFrame(bool hasContent) {
AMQFrame t(in_place<MessageTransferBody>());
- t.setFirstFrame();
- t.setLastFrame();
- t.setFirstSegment();
+ t.setFirstFrame(true);
+ t.setLastFrame(true);
+ t.setFirstSegment(true);
t.setLastSegment(!hasContent);
return t;
}
// Make a content frame
AMQFrame contentFrame(string content, bool isLast=true) {
AMQFrame f(in_place<AMQContentBody>(content));
- f.setFirstFrame();
- f.setLastFrame();
+ f.setFirstFrame(true);
+ f.setLastFrame(true);
+ f.setFirstSegment(false);
f.setLastSegment(isLast);
return f;
}