From 29a99ba263cd32b4bc6510ef748d77abc143227c Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 18 Dec 2007 16:58:23 +0000 Subject: 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 --- cpp/src/qpid/framing/SendContent.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/framing/SendContent.cpp') 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()); if (body->size() > maxContentSize) { uint32_t offset = 0; -- cgit v1.2.1