From a2ded139f371d273afa858f49a5b7f6e0efc2394 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 6 Nov 2007 17:27:27 +0000 Subject: Add support for array type to c++ (and python, decode only for now) Change the type of the in-doubt field in dtx-coordination.recover to an array (to bring in line with amqp spec) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592494 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/FieldValue.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/framing/FieldValue.cpp') diff --git a/cpp/src/qpid/framing/FieldValue.cpp b/cpp/src/qpid/framing/FieldValue.cpp index 5526c9cb72..961b6017cd 100644 --- a/cpp/src/qpid/framing/FieldValue.cpp +++ b/cpp/src/qpid/framing/FieldValue.cpp @@ -25,9 +25,9 @@ namespace qpid { namespace framing { -void FieldValue::decode(Buffer& buffer) +void FieldValue::setType(uint8_t type) { - typeOctet = buffer.getOctet(); + typeOctet = type; uint8_t lenType = typeOctet >> 4; switch(lenType){ @@ -76,6 +76,11 @@ void FieldValue::decode(Buffer& buffer) default: throw SyntaxErrorException(QPID_MSG("Unknown field table value type: " << (int)typeOctet)); } +} + +void FieldValue::decode(Buffer& buffer) +{ + setType(buffer.getOctet()); data->decode(buffer); } -- cgit v1.2.1