Skip to content

Commit 9ffda3f

Browse files
committed
Fix rmw_count_services
Signed-off-by: Minju, Lee <[email protected]>
1 parent b57538d commit 9ffda3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rmw_fastrtps_shared_cpp/src/rmw_count.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ __rmw_count_services(
155155
}
156156
RMW_CHECK_ARGUMENT_FOR_NULL(count, RMW_RET_INVALID_ARGUMENT);
157157
auto common_context = static_cast<rmw_dds_common::Context *>(node->context->impl->common);
158-
const std::string mangled_rp_service_name =
159-
_mangle_topic_name(ros_service_response_prefix, service_name, "Reply").to_string();
160-
return common_context->graph_cache.get_writer_count(mangled_rp_service_name, count);
158+
const std::string mangled_rq_service_name =
159+
_mangle_topic_name(ros_service_requester_prefix, service_name, "Request").to_string();
160+
return common_context->graph_cache.get_reader_count(mangled_rq_service_name, count);
161161
}
162162
} // namespace rmw_fastrtps_shared_cpp

0 commit comments

Comments
 (0)