From e6b7ecb6b275ff05e85ce5fd4b3c5eaa5202fa45 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 24 Oct 2024 17:48:25 +0200 Subject: [PATCH] Fix unset request header writer GUID (#36) * Fix unset request header writer GUID * Fix unset request header writer GUID in `rmw_take_response` --- rmw_zenoh_cpp/src/rmw_zenoh.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rmw_zenoh_cpp/src/rmw_zenoh.cpp b/rmw_zenoh_cpp/src/rmw_zenoh.cpp index cc8b8d5c..81c0be2d 100644 --- a/rmw_zenoh_cpp/src/rmw_zenoh.cpp +++ b/rmw_zenoh_cpp/src/rmw_zenoh.cpp @@ -1874,6 +1874,8 @@ rmw_take_response( return RMW_RET_ERROR; } + memcpy(request_header->request_id.writer_guid, attachment.source_gid, RMW_GID_STORAGE_SIZE); + request_header->source_timestamp = attachment.source_timestamp; if (request_header->source_timestamp < 0) { RMW_SET_ERROR_MSG("Failed to get source_timestamp from client call attachment"); @@ -2337,6 +2339,8 @@ rmw_take_request( return RMW_RET_ERROR; } + memcpy(request_header->request_id.writer_guid, attachment.source_gid, RMW_GID_STORAGE_SIZE); + request_header->source_timestamp = attachment.source_timestamp; if (request_header->source_timestamp < 0) { RMW_SET_ERROR_MSG("Failed to get source_timestamp from client call attachment");