From 4375c7091859f68b2cecc8b655dfc593af14bff7 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 4 Sep 2013 17:00:45 +0000 Subject: QPID-5110: don't lose track of correct index even in the face of incorrectly typed properties git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1520066 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/amqp/MessageReader.cpp | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'cpp/src/qpid/amqp/MessageReader.cpp') diff --git a/cpp/src/qpid/amqp/MessageReader.cpp b/cpp/src/qpid/amqp/MessageReader.cpp index 42faf9d08b..70374f4cd6 100644 --- a/cpp/src/qpid/amqp/MessageReader.cpp +++ b/cpp/src/qpid/amqp/MessageReader.cpp @@ -185,6 +185,70 @@ void MessageReader::PropertiesReader::onNull(const Descriptor*) { ++index; } +void MessageReader::PropertiesReader::onBoolean(bool, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (boolean)"); + ++index; +} +void MessageReader::PropertiesReader::onUByte(uint8_t, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (ubyte)"); + ++index; +} +void MessageReader::PropertiesReader::onUShort(uint16_t, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (ushort)"); + ++index; +} +void MessageReader::PropertiesReader::onByte(int8_t, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (byte)"); + ++index; +} +void MessageReader::PropertiesReader::onShort(int16_t, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (short)"); + ++index; +} +void MessageReader::PropertiesReader::onInt(int32_t, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (int)"); + ++index; +} +void MessageReader::PropertiesReader::onLong(int64_t, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (long)"); + ++index; +} +void MessageReader::PropertiesReader::onFloat(float, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (float)"); + ++index; +} +void MessageReader::PropertiesReader::onDouble(double, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (double)"); + ++index; +} +bool MessageReader::PropertiesReader::onStartList(uint32_t /*count*/, const CharSequence& /*elements*/, const CharSequence& /*complete*/, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (list)"); + ++index; + return false; +} +bool MessageReader::PropertiesReader::onStartMap(uint32_t /*count*/, const CharSequence& /*elements*/, const CharSequence& /*complete*/, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (map)"); + ++index; + return false; +} +bool MessageReader::PropertiesReader::onStartArray(uint32_t /*count*/, const CharSequence&, const Constructor&, const Descriptor*) +{ + QPID_LOG(info, "skipping message property at index " << index << " unexpected type (array)"); + ++index; + return false; +} + //header, properties, amqp-sequence, amqp-value bool MessageReader::onStartList(uint32_t count, const CharSequence& elements, const CharSequence& raw, const Descriptor* descriptor) -- cgit v1.2.1