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 | 5f3a2ed1d6d92b3f4f85472c8b88a462b6cc649b (patch) | |
| tree | 542ab6f5149b44bef219ed4259d037e9a949c266 /cpp | |
| parent | 19731a501b6c2823e35fbf7f95194983bebce8e3 (diff) | |
| download | qpid-python-5f3a2ed1d6d92b3f4f85472c8b88a462b6cc649b.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/qpid@1454436 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/include/qpid/amqp_0_10/Codecs.h | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/Codecs.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/cpp/include/qpid/amqp_0_10/Codecs.h b/cpp/include/qpid/amqp_0_10/Codecs.h index bcf3110923..408307eb7a 100644 --- a/cpp/include/qpid/amqp_0_10/Codecs.h +++ b/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/cpp/src/qpid/amqp_0_10/Codecs.cpp b/cpp/src/qpid/amqp_0_10/Codecs.cpp index a4db88f128..a67ec0360d 100644 --- a/cpp/src/qpid/amqp_0_10/Codecs.cpp +++ b/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"); |
