diff --git a/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp index 5e3b7cfc..727d4b0b 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp @@ -249,7 +249,7 @@ rmw_ret_t ClientData::take_response( auto & reply = latest_reply->get_sample(); - if(!reply.is_ok()) { + if (!reply.is_ok()) { RMW_SET_ERROR_MSG("invalid reply sample"); return RMW_RET_ERROR; } diff --git a/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp index 82caae80..99c49cdb 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp @@ -144,7 +144,7 @@ std::shared_ptr ServiceData::make( std::weak_ptr data_wp = service_data; service_data->qable_ = session->declare_queryable( service_ke, - [data_wp](const zenoh::Query & query){ + [data_wp](const zenoh::Query & query) { auto sub_data = data_wp.lock(); if (sub_data == nullptr) { RMW_ZENOH_LOG_ERROR_NAMED( @@ -417,7 +417,8 @@ rmw_ret_t ServiceData::send_response( const zenoh::Query & loaned_query = query->get_query(); zenoh::Query::ReplyOptions options = zenoh::Query::ReplyOptions::create_default(); - options.attachment = create_map_and_set_sequence_num(request_id->sequence_number, + options.attachment = create_map_and_set_sequence_num( + request_id->sequence_number, request_id->writer_guid); std::vector raw_bytes( diff --git a/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp index 5ed6dfb4..581e6607 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp @@ -268,11 +268,10 @@ bool SubscriptionData::init() opts.accept_replies = ZC_REPLY_KEYEXPR_ANY; zenoh::ZResult err; - std::get>( - sub_data->sub_.value()).get( - zenoh::KeyExpr(selector), - std::move(opts), - &err); + std::get>(sub_data->sub_.value()).get( + zenoh::KeyExpr(selector), + std::move(opts), + &err); if (err != Z_OK) { RMW_SET_ERROR_MSG("unable to get querying subscriber."); diff --git a/rmw_zenoh_cpp/src/zenohd/main.cpp b/rmw_zenoh_cpp/src/zenohd/main.cpp index ea0b4fbe..ab791a03 100644 --- a/rmw_zenoh_cpp/src/zenohd/main.cpp +++ b/rmw_zenoh_cpp/src/zenohd/main.cpp @@ -79,7 +79,7 @@ int main(int argc, char ** argv) std::move(config.value()), zenoh::Session::SessionOptions::create_default(), &result); - if(result != Z_OK) { + if (result != Z_OK) { std::cout << "Error opening Session!" << "\\n"; return 1; }