Updated error returns on rmw_take_serialized and with_message_info (#242)
Signed-off-by: lobotuerk <jtlorente@ekumenlabs.com>
This commit is contained in:
parent
966035ade4
commit
4682af41c5
1 changed files with 14 additions and 4 deletions
|
@ -2667,10 +2667,16 @@ static rmw_ret_t rmw_take_ser_int(
|
||||||
rmw_serialized_message_t * serialized_message, bool * taken,
|
rmw_serialized_message_t * serialized_message, bool * taken,
|
||||||
rmw_message_info_t * message_info)
|
rmw_message_info_t * message_info)
|
||||||
{
|
{
|
||||||
RET_NULL(taken);
|
RMW_CHECK_ARGUMENT_FOR_NULL(
|
||||||
RET_NULL(serialized_message);
|
subscription, RMW_RET_INVALID_ARGUMENT);
|
||||||
RET_NULL(subscription);
|
RMW_CHECK_ARGUMENT_FOR_NULL(
|
||||||
RET_WRONG_IMPLID(subscription);
|
serialized_message, RMW_RET_INVALID_ARGUMENT);
|
||||||
|
RMW_CHECK_ARGUMENT_FOR_NULL(
|
||||||
|
taken, RMW_RET_INVALID_ARGUMENT);
|
||||||
|
RMW_CHECK_TYPE_IDENTIFIERS_MATCH(
|
||||||
|
subscription handle,
|
||||||
|
subscription->implementation_identifier, eclipse_cyclonedds_identifier,
|
||||||
|
return RMW_RET_INCORRECT_RMW_IMPLEMENTATION)
|
||||||
CddsSubscription * sub = static_cast<CddsSubscription *>(subscription->data);
|
CddsSubscription * sub = static_cast<CddsSubscription *>(subscription->data);
|
||||||
RET_NULL(sub);
|
RET_NULL(sub);
|
||||||
dds_sample_info_t info;
|
dds_sample_info_t info;
|
||||||
|
@ -2747,6 +2753,10 @@ extern "C" rmw_ret_t rmw_take_serialized_message_with_info(
|
||||||
rmw_subscription_allocation_t * allocation)
|
rmw_subscription_allocation_t * allocation)
|
||||||
{
|
{
|
||||||
static_cast<void>(allocation);
|
static_cast<void>(allocation);
|
||||||
|
|
||||||
|
RMW_CHECK_ARGUMENT_FOR_NULL(
|
||||||
|
message_info, RMW_RET_INVALID_ARGUMENT);
|
||||||
|
|
||||||
return rmw_take_ser_int(subscription, serialized_message, taken, message_info);
|
return rmw_take_ser_int(subscription, serialized_message, taken, message_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue