summaryrefslogtreecommitdiff
path: root/cpp/common/framing/src/AMQFrame.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2006-09-27 19:50:23 +0000
committerAlan Conway <aconway@apache.org>2006-09-27 19:50:23 +0000
commitcaca23c5dc055d985fecfe188573104bc707ad9d (patch)
tree154c0bbd4c7bca70080de28116b5654491657906 /cpp/common/framing/src/AMQFrame.cpp
parent9d718c2348708b0b27ce9fb9fcbf05c4b0a997cc (diff)
downloadqpid-python-caca23c5dc055d985fecfe188573104bc707ad9d.tar.gz
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@450556 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/common/framing/src/AMQFrame.cpp')
-rw-r--r--cpp/common/framing/src/AMQFrame.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/cpp/common/framing/src/AMQFrame.cpp b/cpp/common/framing/src/AMQFrame.cpp
index 70f71010ff..5686c9ac81 100644
--- a/cpp/common/framing/src/AMQFrame.cpp
+++ b/cpp/common/framing/src/AMQFrame.cpp
@@ -1,3 +1,4 @@
+
/*
*
* Copyright (c) 2006 The Apache Software Foundation
@@ -126,21 +127,8 @@ void AMQFrame::decodeBody(Buffer& buffer, uint32_t size)
std::ostream& qpid::framing::operator<<(std::ostream& out, const AMQFrame& t){
out << "Frame[channel=" << t.channel << "; ";
- if(t.body.get() == 0){
- out << "empty";
- }else if(t.body->type() == METHOD_BODY){
- (dynamic_cast<AMQMethodBody*>(t.body.get()))->print(out);
- }else if(t.body->type() == HEADER_BODY){
- out << "header, content_size=" <<
- (dynamic_cast<AMQHeaderBody*>(t.body.get()))->getContentSize()
- << " (" << t.body->size() << " bytes)";
- }else if(t.body->type() == CONTENT_BODY){
- out << "content (" << t.body->size() << " bytes)";
- }else if(t.body->type() == HEARTBEAT_BODY){
- out << "heartbeat";
- }else{
- out << "unknown type, " << t.body->type();
- }
+ if (t.body.get() == 0) out << "empty";
+ else out << *t.body;
out << "]";
return out;
}