Skip to content

Commit

Permalink
uAMQP fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryOsterman committed Oct 18, 2024
1 parent 472c542 commit 6acd7c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sdk/core/azure-core-amqp/src/models/amqp_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ namespace Azure { namespace Core { namespace Amqp { namespace Models {
{
AmqpValue value{AmqpValue::Deserialize(data, size)};
Azure::Core::Amqp::_detail::PropertiesImplementation* handle;
#if ENABLE_RUST_AMQP
CallContext callContext;
if (amqpvalue_get_properties(
callContext.GetCallContext(),
Expand All @@ -478,6 +479,12 @@ namespace Azure { namespace Core { namespace Amqp { namespace Models {
throw std::runtime_error(
"Could not convert value to AMQP Properties: " + callContext.GetError());
}
#elif ENABLE_UAMQP
if (amqpvalue_get_properties(_detail::AmqpValueFactory::ToImplementation(value), &handle))
{
throw std::runtime_error("Could not convert value to AMQP Properties");
}
#endif
_detail::UniquePropertiesHandle uniqueHandle{handle};
handle = nullptr;
return _detail::MessagePropertiesFactory::FromImplementation(uniqueHandle);
Expand Down

0 comments on commit 6acd7c0

Please sign in to comment.