Skip to content

Commit 7bfd709

Browse files
committed
Add already obsoleted loaned message interfaces
The rmw_return_loaned_message and rmw_release_loaned_message functions are still expected by rcl, even if they are scheduled to be replaced. We need a working build, so add them for now. Signed-off-by: Erik Boasson <[email protected]>
1 parent d8cb336 commit 7bfd709

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

rmw_cyclonedds_cpp/src/rmw_node.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,16 @@ extern "C" rmw_ret_t rmw_return_loaned_message_from_publisher(
12371237
return RMW_RET_UNSUPPORTED;
12381238
}
12391239

1240+
extern "C" rmw_ret_t rmw_return_loaned_message(
1241+
const rmw_publisher_t * publisher,
1242+
void * loaned_message)
1243+
{
1244+
/* https://github.com/ros2/rmw/pull/192 replaces this one with
1245+
rmw_return_loaned_message_from_publisher, but until that PR is accepted, this one is
1246+
needed to make things build & work */
1247+
return rmw_return_loaned_message_from_publisher(publisher, loaned_message);
1248+
}
1249+
12401250
extern "C" rmw_ret_t rmw_destroy_publisher(rmw_node_t * node, rmw_publisher_t * publisher)
12411251
{
12421252
RET_WRONG_IMPLID(node);
@@ -1593,6 +1603,16 @@ extern "C" rmw_ret_t rmw_return_loaned_message_from_subscription(
15931603
return RMW_RET_UNSUPPORTED;
15941604
}
15951605

1606+
extern "C" rmw_ret_t rmw_release_loaned_message(
1607+
const rmw_subscription_t * subscription,
1608+
void * loaned_message)
1609+
{
1610+
/* https://github.com/ros2/rmw/pull/192 replaces this one with
1611+
rmw_return_loaned_message_from_subscription, but until that PR is accepted, this one
1612+
is needed to make things build & work */
1613+
return rmw_return_loaned_message_from_subscription(subscription, loaned_message);
1614+
}
1615+
15961616
extern "C" rmw_ret_t rmw_take_event(
15971617
const rmw_event_t * event_handle, void * event_info,
15981618
bool * taken)

0 commit comments

Comments
 (0)