From b9a08f563a922efedc6139ae405619b7cbb54bda Mon Sep 17 00:00:00 2001 From: Jay Sridharan Date: Fri, 30 Apr 2021 14:28:37 +0000 Subject: [PATCH] Fix partition copy in QoS Signed-off-by: Jay Sridharan --- src/cpp/fastdds/publisher/qos/WriterQos.cpp | 2 +- src/cpp/rtps/builtin/discovery/participant/PDP.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpp/fastdds/publisher/qos/WriterQos.cpp b/src/cpp/fastdds/publisher/qos/WriterQos.cpp index ada5fdf5969..7ebbaea962e 100644 --- a/src/cpp/fastdds/publisher/qos/WriterQos.cpp +++ b/src/cpp/fastdds/publisher/qos/WriterQos.cpp @@ -95,7 +95,7 @@ void WriterQos::setQos( m_presentation = qos.m_presentation; m_presentation.hasChanged = true; } - if (first_time || qos.m_partition.names().size() > 0) + if (first_time || qos.m_partition.names() != m_partition.names()) { m_partition = qos.m_partition; m_partition.hasChanged = true; diff --git a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp index c7bf9d7c733..ffa991cb12d 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp @@ -1070,6 +1070,7 @@ bool PDP::remove_remote_participant( // Return reader proxy objects to pool for (auto pit : *pdata->m_readers) { + pit.second->clear(); reader_proxies_pool_.push_back(pit.second); } pdata->m_readers->clear(); @@ -1077,6 +1078,7 @@ bool PDP::remove_remote_participant( // Return writer proxy objects to pool for (auto pit : *pdata->m_writers) { + pit.second->clear(); writer_proxies_pool_.push_back(pit.second); } pdata->m_writers->clear();