File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ DomainParticipantImpl::DomainParticipantImpl(
132132 {
133133 EPROSIMA_LOG_ERROR (DOMAIN_PARTICIPANT, " Error generating GUID for participant" );
134134 }
135+ handle_ = guid_;
135136
136137 /* Fill physical data properties if they are found and empty */
137138 std::string* property_value = fastdds::rtps::PropertyPolicyHelper::find_property (
@@ -304,6 +305,7 @@ ReturnCode_t DomainParticipantImpl::enable()
304305 }
305306
306307 guid_ = part->getGuid ();
308+ handle_ = guid_;
307309
308310 {
309311 std::lock_guard<std::mutex> _ (mtx_gs_);
@@ -775,7 +777,7 @@ IContentFilterFactory* DomainParticipantImpl::find_content_filter_factory(
775777
776778const InstanceHandle_t& DomainParticipantImpl::get_instance_handle () const
777779{
778- return static_cast < const InstanceHandle_t&>(guid_) ;
780+ return handle_ ;
779781}
780782
781783const fastdds::rtps::GUID_t& DomainParticipantImpl::guid () const
Original file line number Diff line number Diff line change @@ -723,6 +723,9 @@ class DomainParticipantImpl
723723 // !Pre-calculated guid
724724 fastdds::rtps::GUID_t guid_;
725725
726+ // !Translation into InstanceHandle_t of the guid
727+ InstanceHandle_t handle_;
728+
726729 // !For instance handle creation
727730 std::atomic<uint32_t > next_instance_id_;
728731
You can’t perform that action at this time.
0 commit comments