Skip to content

Commit

Permalink
Fix logging in rmw_node_info_and_types.cpp (#273)
Browse files Browse the repository at this point in the history
When logging a rcutils_error_string_t variable, the
str field of the rcutils_error_string_t variable needs
to be logged, not the struct directly.

Signed-off-by: Thomas Moulard <tmoulard@amazon.com>
  • Loading branch information
thomas-moulard authored and dirk-thomas committed Apr 28, 2019
1 parent 3636d3a commit a502ba6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ __copy_data_to_results(
if (rmw_ret != RMW_RET_OK) {
RCUTILS_LOG_ERROR_NAMED(
kLoggerTag,
"error during report of error: %s", rmw_get_error_string());
"error during report of error: %s", rmw_get_error_string().str);
}
};
// Setup demangling functions based on no_demangle option
Expand Down Expand Up @@ -444,7 +444,7 @@ __rmw_get_service_names_and_types_by_node(
if (rmw_ret != RMW_RET_OK) {
RCUTILS_LOG_ERROR_NAMED(
kLoggerTag,
"error during report of error: %s", rmw_get_error_string());
"error during report of error: %s", rmw_get_error_string().str);
}
};
// For each service, store the name, initialize the string array for types, and store all types
Expand Down

0 comments on commit a502ba6

Please sign in to comment.