diff options
author | Andrew Stitcher <astitcher@apache.org> | 2013-03-08 15:55:36 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2013-03-08 15:55:36 +0000 |
commit | 81804b1070e8807a0e34572730748e2855e92a8c (patch) | |
tree | f1b7b83629ade791f1d5663256aabedcd0a73ba9 | |
parent | f77b8e784bcb850cb066f02f7c8951d94f0ff2bc (diff) | |
download | qpid-python-81804b1070e8807a0e34572730748e2855e92a8c.tar.gz |
QPID-4626: Amqp 0-10 Message getProperty() does not correctly return booleans
- Add codec function to convert FieldValue to Variant to support this change
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1454436 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/include/qpid/amqp_0_10/Codecs.h | 2 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/qpid/cpp/include/qpid/amqp_0_10/Codecs.h b/qpid/cpp/include/qpid/amqp_0_10/Codecs.h index bcf3110923..408307eb7a 100644 --- a/qpid/cpp/include/qpid/amqp_0_10/Codecs.h +++ b/qpid/cpp/include/qpid/amqp_0_10/Codecs.h @@ -76,6 +76,8 @@ QPID_COMMON_EXTERN void translate(const qpid::types::Variant::Map& from, const s QPID_COMMON_EXTERN void translate(const qpid::framing::FieldTable& from, qpid::types::Variant::Map& to); +QPID_COMMON_EXTERN void translate(const boost::shared_ptr<qpid::framing::FieldValue> from, + qpid::types::Variant& to); QPID_COMMON_EXTERN void translate(const types::Variant& from, boost::shared_ptr<qpid::framing::FieldValue> to); diff --git a/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp b/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp index a4db88f128..a67ec0360d 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp +++ b/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp @@ -576,6 +576,11 @@ void translate(const types::Variant& from, boost::shared_ptr<framing::FieldValue to = toFieldValue(from); } +void translate(const boost::shared_ptr<FieldValue> from, Variant& to) +{ + to = toVariant(from); +} + const std::string ListCodec::contentType("amqp/list"); const std::string MapCodec::contentType("amqp/map"); |