summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/SendContent.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-12-18 16:58:23 +0000
committerGordon Sim <gsim@apache.org>2007-12-18 16:58:23 +0000
commit29a99ba263cd32b4bc6510ef748d77abc143227c (patch)
treea570a686b1804a56c54873af0c2ce51284ab13e2 /cpp/src/qpid/framing/SendContent.cpp
parenta1643ff7395fec6c46d2cd08c5fda7a8d0cfa99a (diff)
downloadqpid-python-29a99ba263cd32b4bc6510ef748d77abc143227c.tar.gz
Fixes to max frame size default and fragmentation on broker.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@605251 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/SendContent.cpp')
-rw-r--r--cpp/src/qpid/framing/SendContent.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/framing/SendContent.cpp b/cpp/src/qpid/framing/SendContent.cpp
index 85b9b995ad..a62e4eeb72 100644
--- a/cpp/src/qpid/framing/SendContent.cpp
+++ b/cpp/src/qpid/framing/SendContent.cpp
@@ -30,7 +30,9 @@ void qpid::framing::SendContent::operator()(const AMQFrame& f)
bool first = frameCount == 0;
bool last = ++frameCount == expectedFrameCount;
- uint16_t maxContentSize = maxFrameSize - AMQFrame::frameOverhead();
+ /*end of frame marker is included in frameOverhead() but not in
+ real frame size, hence substract -1 from frameOverhead()*/
+ uint16_t maxContentSize = maxFrameSize - (AMQFrame::frameOverhead() - 1);
const AMQContentBody* body(f.castBody<AMQContentBody>());
if (body->size() > maxContentSize) {
uint32_t offset = 0;