summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/FieldValue.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-11-06 17:27:27 +0000
committerGordon Sim <gsim@apache.org>2007-11-06 17:27:27 +0000
commita2ded139f371d273afa858f49a5b7f6e0efc2394 (patch)
tree8fc04da8ffe3aa819843a101a75d98429f27eaa5 /cpp/src/qpid/framing/FieldValue.cpp
parenta1a0ecfbf02293cf917db5e56d65d367be5ad5a7 (diff)
downloadqpid-python-a2ded139f371d273afa858f49a5b7f6e0efc2394.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/framing/FieldValue.cpp')
-rw-r--r--cpp/src/qpid/framing/FieldValue.cpp9
1 files changed, 7 insertions, 2 deletions
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);
}