diff options
author | Gordon Sim <gsim@apache.org> | 2007-09-13 17:29:16 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-09-13 17:29:16 +0000 |
commit | 0a1b3430450f274aee273a9f792a2d43f771b85f (patch) | |
tree | 71be3bc1a920a568c0680f8e8a5e802c1c3bee8d /cpp/src/qpid/broker/Message.cpp | |
parent | e00a1cfa3881e3bb8aadfecdf502f17903e319b1 (diff) | |
download | qpid-python-0a1b3430450f274aee273a9f792a2d43f771b85f.tar.gz |
Use frameset begin/end flags for determining frameset boundaries.
Set frameset & segment begin/end flags for content bearing methods (i.e. messages).
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@575377 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Message.cpp')
-rw-r--r-- | cpp/src/qpid/broker/Message.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/Message.cpp b/cpp/src/qpid/broker/Message.cpp index 84d3478173..39f9f85c13 100644 --- a/cpp/src/qpid/broker/Message.cpp +++ b/cpp/src/qpid/broker/Message.cpp @@ -144,7 +144,7 @@ void Message::sendContent(framing::FrameHandler& out, uint16_t channel, uint16_t if (isContentReleased()) { //load content from store in chunks of maxContentSize uint16_t maxContentSize = maxFrameSize - AMQFrame::frameOverhead(); - uint64_t expectedSize(frames.getHeaders()->getContentLength());//TODO: how do we know how much data to load? + uint64_t expectedSize(frames.getHeaders()->getContentLength()); for (uint64_t offset = 0; offset < expectedSize; offset += maxContentSize) { uint64_t remaining = expectedSize - offset; @@ -153,11 +153,22 @@ void Message::sendContent(framing::FrameHandler& out, uint16_t channel, uint16_t store->loadContent(*this, data, offset, remaining > maxContentSize ? maxContentSize : remaining); + frame.setBof(false); + if (offset > 0) { + frame.setBos(false); + } + if (remaining) { + frame.setEos(false); + frame.setEof(false); + } out.handle(frame); } } else { - SendContent f(out, channel, maxFrameSize); + Count c; + frames.map_if(c, TypeFilter(CONTENT_BODY)); + + SendContent f(out, channel, maxFrameSize, c.getCount()); frames.map_if(f, TypeFilter(CONTENT_BODY)); } } |