summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/SendContent.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-10-07 17:24:24 +0000
committerAlan Conway <aconway@apache.org>2008-10-07 17:24:24 +0000
commita653ebe5bdfad1d44a576d2ab23f7e6ea80ba96f (patch)
treecf778054e9316b643d84c95dbe88ba72810f49cf /cpp/src/qpid/framing/SendContent.cpp
parent4eb2dca5b9ae07228f542cd798b44cc44ea96c09 (diff)
downloadqpid-python-a653ebe5bdfad1d44a576d2ab23f7e6ea80ba96f.tar.gz
Rename size() to encodedSize() for encoded types to allow std collection interfaces for types like FieldTable and Array.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@702551 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/SendContent.cpp')
-rw-r--r--cpp/src/qpid/framing/SendContent.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/framing/SendContent.cpp b/cpp/src/qpid/framing/SendContent.cpp
index a62e4eeb72..f390106dee 100644
--- a/cpp/src/qpid/framing/SendContent.cpp
+++ b/cpp/src/qpid/framing/SendContent.cpp
@@ -34,13 +34,13 @@ void qpid::framing::SendContent::operator()(const AMQFrame& f)
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) {
+ if (body->encodedSize() > maxContentSize) {
uint32_t offset = 0;
- for (int chunk = body->size() / maxContentSize; chunk > 0; chunk--) {
- sendFragment(*body, offset, maxContentSize, first && offset == 0, last && offset + maxContentSize == body->size());
+ for (int chunk = body->encodedSize() / maxContentSize; chunk > 0; chunk--) {
+ sendFragment(*body, offset, maxContentSize, first && offset == 0, last && offset + maxContentSize == body->encodedSize());
offset += maxContentSize;
}
- uint32_t remainder = body->size() % maxContentSize;
+ uint32_t remainder = body->encodedSize() % maxContentSize;
if (remainder) {
sendFragment(*body, offset, remainder, first && offset == 0, last);
}