Skip to content

Commit 6dd0abf

Browse files
committed
- Changed default return type for rmw_get_publishers_info_by_topic and
rmw_get_subscriptions_info_by_topic to RMW_RET_UNSUPPORTED. - Added a rmw_reset_error_msg() after GET_SYMBOL() to above two functions to prevent a display of "Error message being replaced. Called rcultils_reset_error() after error handling". Signed-off-by: Jaison Titus <[email protected]>
1 parent feb6744 commit 6dd0abf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rmw_implementation/src/functions.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ RMW_INTERFACE_FN(rmw_set_log_severity,
535535
1, ARG_TYPES(rmw_log_severity_t))
536536

537537
RMW_INTERFACE_FN(rmw_get_publishers_info_by_topic,
538-
rmw_ret_t, RMW_RET_ERROR,
538+
rmw_ret_t, RMW_RET_UNSUPPORTED,
539539
5, ARG_TYPES(
540540
const rmw_node_t *,
541541
rcutils_allocator_t *,
@@ -544,7 +544,7 @@ RMW_INTERFACE_FN(rmw_get_publishers_info_by_topic,
544544
rmw_topic_info_array_t *))
545545

546546
RMW_INTERFACE_FN(rmw_get_subscriptions_info_by_topic,
547-
rmw_ret_t, RMW_RET_ERROR,
547+
rmw_ret_t, RMW_RET_UNSUPPORTED,
548548
5, ARG_TYPES(
549549
const rmw_node_t *,
550550
rcutils_allocator_t *,
@@ -626,7 +626,9 @@ void prefetch_symbols(void)
626626
GET_SYMBOL(rmw_service_server_is_available)
627627
GET_SYMBOL(rmw_set_log_severity)
628628
GET_SYMBOL(rmw_get_publishers_info_by_topic)
629+
rmw_reset_error();
629630
GET_SYMBOL(rmw_get_subscriptions_info_by_topic)
631+
rmw_reset_error();
630632
}
631633

632634
void * symbol_rmw_init = nullptr;

0 commit comments

Comments
 (0)