Skip to content

Commit

Permalink
Merge branch 'rolling' into wip/merge-rolling
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan committed Nov 15, 2024
2 parents cb87b1e + e29ac6d commit 46ec449
Show file tree
Hide file tree
Showing 15 changed files with 1,374 additions and 1,170 deletions.
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ add_library(rmw_zenoh_cpp SHARED
src/detail/logging.cpp
src/detail/message_type_support.cpp
src/detail/qos.cpp
src/detail/rmw_client_data.cpp
src/detail/rmw_context_impl_s.cpp
src/detail/rmw_data_types.cpp
src/detail/rmw_publisher_data.cpp
src/detail/rmw_node_data.cpp
src/detail/rmw_service_data.cpp
Expand Down
9 changes: 4 additions & 5 deletions rmw_zenoh_cpp/src/detail/graph_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#include "graph_cache.hpp"
#include "logging_macros.hpp"
#include "rmw_data_types.hpp"

namespace rmw_zenoh_cpp
{
Expand Down Expand Up @@ -1182,15 +1181,15 @@ rmw_ret_t GraphCache::get_entities_info_by_topic(

///=============================================================================
rmw_ret_t GraphCache::service_server_is_available(
const char * service_name,
const char * service_type,
const liveliness::TopicInfo & client_topic_info,
bool * is_available) const
{
*is_available = false;
std::lock_guard<std::mutex> lock(graph_mutex_);
GraphNode::TopicMap::const_iterator service_it = graph_services_.find(service_name);
GraphNode::TopicMap::const_iterator service_it = graph_services_.find(client_topic_info.name_);
if (service_it != graph_services_.end()) {
GraphNode::TopicTypeMap::const_iterator type_it = service_it->second.find(service_type);
GraphNode::TopicTypeMap::const_iterator type_it =
service_it->second.find(client_topic_info.type_);
if (type_it != service_it->second.end()) {
for (const auto & [_, topic_data] : type_it->second) {
if (topic_data->subs_.size() > 0) {
Expand Down
3 changes: 1 addition & 2 deletions rmw_zenoh_cpp/src/detail/graph_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ class GraphCache final
rmw_topic_endpoint_info_array_t * endpoints_info) const;

rmw_ret_t service_server_is_available(
const char * service_name,
const char * service_type,
const liveliness::TopicInfo & client_topic_info,
bool * is_available) const;

/// Set a qos event callback for an entity from the current session.
Expand Down
Loading

0 comments on commit 46ec449

Please sign in to comment.