diff options
| author | Alan Conway <aconway@apache.org> | 2008-05-23 13:39:07 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-05-23 13:39:07 +0000 |
| commit | 558dcdd6eefd334cd81fcf0c4a3843097974f652 (patch) | |
| tree | c85cee7179b3e721954a231178fe78f68b4c50ed /qpid/cpp/src/tests/SessionState.cpp | |
| parent | 2be65f56d7b82430679e068756cc3d10b0855d47 (diff) | |
| download | qpid-python-558dcdd6eefd334cd81fcf0c4a3843097974f652.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@659538 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/SessionState.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/SessionState.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/qpid/cpp/src/tests/SessionState.cpp b/qpid/cpp/src/tests/SessionState.cpp index 4beef87cfe..40922b3be8 100644 --- a/qpid/cpp/src/tests/SessionState.cpp +++ b/qpid/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; } |
