Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/cpp/fastdds/domain/DomainParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ DomainParticipantImpl::DomainParticipantImpl(
{
EPROSIMA_LOG_ERROR(DOMAIN_PARTICIPANT, "Error generating GUID for participant");
}
handle_ = guid_;

/* Fill physical data properties if they are found and empty */
std::string* property_value = fastdds::rtps::PropertyPolicyHelper::find_property(
Expand Down Expand Up @@ -304,6 +305,7 @@ ReturnCode_t DomainParticipantImpl::enable()
}

guid_ = part->getGuid();
handle_ = guid_;

{
std::lock_guard<std::mutex> _(mtx_gs_);
Expand Down Expand Up @@ -775,7 +777,7 @@ IContentFilterFactory* DomainParticipantImpl::find_content_filter_factory(

const InstanceHandle_t& DomainParticipantImpl::get_instance_handle() const
{
return static_cast<const InstanceHandle_t&>(guid_);
return handle_;
}

const fastdds::rtps::GUID_t& DomainParticipantImpl::guid() const
Expand Down
3 changes: 3 additions & 0 deletions src/cpp/fastdds/domain/DomainParticipantImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,9 @@ class DomainParticipantImpl
//!Pre-calculated guid
fastdds::rtps::GUID_t guid_;

//!Translation into InstanceHandle_t of the guid
InstanceHandle_t handle_;

//!For instance handle creation
std::atomic<uint32_t> next_instance_id_;

Expand Down
Loading