Skip to content

Commit 7ea2e78

Browse files
committed
use return_loaned_message_from
Signed-off-by: Karsten Knese <[email protected]>
1 parent e6e9e74 commit 7ea2e78

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rclcpp/include/rclcpp/loaned_message.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class LoanedMessage
136136
if (pub_.can_loan_messages()) {
137137
// return allocated memory to the middleware
138138
auto ret =
139-
rcl_return_loaned_message(pub_.get_publisher_handle(), message_);
139+
rcl_return_loaned_message_from_publisher(pub_.get_publisher_handle(), message_);
140140
if (ret != RCL_RET_OK) {
141141
RCLCPP_ERROR(
142142
error_logger, "rcl_deallocate_loaned_message failed: %s", rcl_get_error_string().str);

rclcpp/src/rclcpp/executor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,13 @@ Executor::execute_subscription(
347347
subscription->get_topic_name(), rcl_get_error_string().str);
348348
rcl_reset_error();
349349
}
350-
ret = rcl_release_loaned_message(
350+
ret = rcl_return_loaned_message_from_subscription(
351351
subscription->get_subscription_handle().get(),
352352
loaned_msg);
353353
if (RCL_RET_OK != ret) {
354354
RCUTILS_LOG_ERROR_NAMED(
355355
"rclcpp",
356-
"release_loaned failed for subscription on topic '%s': %s",
356+
"return_loaned_message failed for subscription on topic '%s': %s",
357357
subscription->get_topic_name(), rcl_get_error_string().str);
358358
}
359359
loaned_msg = nullptr;

0 commit comments

Comments
 (0)