Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Jul 5, 2024
1 parent e3985be commit 8c0beb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 62 deletions.
39 changes: 2 additions & 37 deletions src/cpp/rtps/reader/StatefulReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,40 +373,6 @@ bool StatefulReader::matched_writer_remove(
const GUID_t& writer_guid,
bool removed_by_lease)
{
<<<<<<< HEAD

if (is_alive_ && liveliness_lease_duration_ < c_TimeInfinite)
{
auto wlp = this->mp_RTPSParticipant->wlp();
if ( wlp != nullptr)
{
LivelinessData::WriterStatus writer_liveliness_status;
wlp->sub_liveliness_manager_->remove_writer(
writer_guid,
liveliness_kind_,
liveliness_lease_duration_,
writer_liveliness_status);

if (writer_liveliness_status == LivelinessData::WriterStatus::ALIVE)
{
wlp->update_liveliness_changed_status(writer_guid, this, -1, 0);
}
else if (writer_liveliness_status == LivelinessData::WriterStatus::NOT_ALIVE)
{
wlp->update_liveliness_changed_status(writer_guid, this, 0, -1);
}

}
else
{
EPROSIMA_LOG_ERROR(RTPS_LIVELINESS,
"Finite liveliness lease duration but WLP not enabled, cannot remove writer");
}
}

std::unique_lock<RecursiveTimedMutex> lock(mp_mutex);
=======
>>>>>>> 9243eadae (Fix topic interference on `liveliness_changed` status (#4988))
WriterProxy* wproxy = nullptr;
if (is_alive_)
{
Expand Down Expand Up @@ -488,13 +454,12 @@ bool StatefulReader::matched_writer_remove(

if (writer_liveliness_status == LivelinessData::WriterStatus::ALIVE)
{
update_liveliness_changed_status(writer_guid, -1, 0);
wlp->update_liveliness_changed_status(writer_guid, this, -1, 0);
}
else if (writer_liveliness_status == LivelinessData::WriterStatus::NOT_ALIVE)
{
update_liveliness_changed_status(writer_guid, 0, -1);
wlp->update_liveliness_changed_status(writer_guid, this, 0, -1);
}

}
else
{
Expand Down
22 changes: 2 additions & 20 deletions src/cpp/rtps/reader/StatelessReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,24 +225,6 @@ bool StatelessReader::matched_writer_remove(
{
bool ret_val = false;

<<<<<<< HEAD
if (writer_liveliness_status == LivelinessData::WriterStatus::ALIVE)
{
wlp->update_liveliness_changed_status(writer_guid, this, -1, 0);
}
else if (writer_liveliness_status == LivelinessData::WriterStatus::NOT_ALIVE)
{
wlp->update_liveliness_changed_status(writer_guid, this, 0, -1);
}
}
else
{
EPROSIMA_LOG_ERROR(RTPS_LIVELINESS,
"Finite liveliness lease duration but WLP not enabled, cannot remove writer");
}
}
=======
>>>>>>> 9243eadae (Fix topic interference on `liveliness_changed` status (#4988))
{
std::unique_lock<RecursiveTimedMutex> guard(mp_mutex);

Expand Down Expand Up @@ -302,11 +284,11 @@ bool StatelessReader::matched_writer_remove(

if (writer_liveliness_status == LivelinessData::WriterStatus::ALIVE)
{
update_liveliness_changed_status(writer_guid, -1, 0);
wlp->update_liveliness_changed_status(writer_guid, this, -1, 0);
}
else if (writer_liveliness_status == LivelinessData::WriterStatus::NOT_ALIVE)
{
update_liveliness_changed_status(writer_guid, 0, -1);
wlp->update_liveliness_changed_status(writer_guid, this, 0, -1);
}
}
else
Expand Down
7 changes: 2 additions & 5 deletions test/blackbox/common/BlackboxTestsLivelinessQos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

<<<<<<< HEAD
#include "BlackboxTests.hpp"

=======
#include <string>
>>>>>>> 9243eadae (Fix topic interference on `liveliness_changed` status (#4988))
#include <thread>

#include "PubSubReader.hpp"
Expand Down Expand Up @@ -2058,8 +2055,8 @@ static void test_liveliness_qos_independent_topics(
eprosima::fastdds::dds::ReliabilityQosPolicyKind reliability_kind)
{
const auto lease_dutation_time = std::chrono::seconds(1);
const eprosima::fastdds::Duration_t lease_duration(1, 0);
const eprosima::fastdds::Duration_t announcement_period(0, 250000000);
const eprosima::fastrtps::Duration_t lease_duration(1, 0);
const eprosima::fastrtps::Duration_t announcement_period(0, 250000000);

PubSubReader<HelloWorldPubSubType> reader1(topic_name + "1");
PubSubReader<HelloWorldPubSubType> reader2(topic_name + "2");
Expand Down

0 comments on commit 8c0beb2

Please sign in to comment.