From 8f21f5d6cacd35e6fe04a0b4a5567fc4929f997e Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 30 Nov 2006 16:41:52 +0000 Subject: Patches from Andrew Stitcher to fix QPID-140, QPID-141. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480994 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/AMQFrame.cpp | 18 +++++++++++------- cpp/src/qpid/framing/AMQFrame.h | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/framing/AMQFrame.cpp b/cpp/src/qpid/framing/AMQFrame.cpp index b58bc93545..df4d2574b4 100644 --- a/cpp/src/qpid/framing/AMQFrame.cpp +++ b/cpp/src/qpid/framing/AMQFrame.cpp @@ -24,20 +24,24 @@ using namespace qpid::framing; -// AMQP version management change - kpvdr 2006-11-17 -// TODO: Make this class version-aware and link these hard-wired numbers to that version -AMQFrame::AMQFrame() : versionMap(8, 0) {} +// This only works as a static as the version is currently fixed to 8.0 +// TODO: When the class is version-aware this will need to change +AMQP_MethodVersionMap AMQFrame::versionMap(8,0); + +// AMQP version management change - kpvdr 2-11-17 +// TODO: Make this class version-aware +AMQFrame::AMQFrame() {} // AMQP version management change - kpvdr 2006-11-17 -// TODO: Make this class version-aware and link these hard-wired numbers to that version +// TODO: Make this class version-aware AMQFrame::AMQFrame(u_int16_t _channel, AMQBody* _body) : -channel(_channel), body(_body), versionMap(8, 0) +channel(_channel), body(_body) {} // AMQP version management change - kpvdr 2006-11-17 -// TODO: Make this class version-aware and link these hard-wired numbers to that version +// TODO: Make this class version-aware AMQFrame::AMQFrame(u_int16_t _channel, AMQBody::shared_ptr& _body) : -channel(_channel), body(_body), versionMap(8, 0) +channel(_channel), body(_body) {} AMQFrame::~AMQFrame() {} diff --git a/cpp/src/qpid/framing/AMQFrame.h b/cpp/src/qpid/framing/AMQFrame.h index 29ee1250e1..aa6b2249aa 100644 --- a/cpp/src/qpid/framing/AMQFrame.h +++ b/cpp/src/qpid/framing/AMQFrame.h @@ -37,10 +37,11 @@ namespace qpid { class AMQFrame : virtual public AMQDataBlock { + static AMQP_MethodVersionMap versionMap; + u_int16_t channel; u_int8_t type;//used if the body is decoded separately from the 'head' AMQBody::shared_ptr body; - AMQP_MethodVersionMap versionMap; AMQBody::shared_ptr createMethodBody(Buffer& buffer); public: -- cgit v1.2.1