Skip to content

Commit

Permalink
Refs #19576: Fix linux ci
Browse files Browse the repository at this point in the history
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
  • Loading branch information
cferreiragonz committed Sep 28, 2023
1 parent 6ef004e commit 970ee23
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 242 deletions.
15 changes: 9 additions & 6 deletions src/cpp/fastdds/publisher/DataWriterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1144,12 +1144,15 @@ ReturnCode_t DataWriterImpl::set_qos(
return ReturnCode_t::RETCODE_IMMUTABLE_POLICY;
}
set_qos(qos_, qos_to_set, enabled);
// Update times and positive_acks attributes
WriterAttributes w_att;
w_att.times = qos_.reliable_writer_qos().times;
w_att.disable_positive_acks = qos_.reliable_writer_qos().disable_positive_acks.enabled;
w_att.keep_duration = qos_.reliable_writer_qos().disable_positive_acks.duration;
writer_->updateAttributes(w_att);
if (enabled && qos_.reliability().kind == eprosima::fastrtps::RELIABLE_RELIABILITY_QOS)
{
// Update times and positive_acks attributes on RTPS Layer
WriterAttributes w_att;
w_att.times = qos_.reliable_writer_qos().times;
w_att.disable_positive_acks = qos_.reliable_writer_qos().disable_positive_acks.enabled;
w_att.keep_duration = qos_.reliable_writer_qos().disable_positive_acks.duration;
writer_->updateAttributes(w_att);
}

if (enabled)
{
Expand Down
7 changes: 6 additions & 1 deletion src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,10 @@ void StatefulWriter::updateAttributes(
const WriterAttributes& att)
{
this->updateTimes(att.times);
this->updatePositiveAcks(att);
if (this->get_disable_positive_acks())
{
this->updatePositiveAcks(att);
}
}

void StatefulWriter::updatePositiveAcks(
Expand All @@ -1632,6 +1635,7 @@ void StatefulWriter::updatePositiveAcks(
std::lock_guard<RecursiveTimedMutex> guard(mp_mutex);
if (keep_duration_us_.count() != (att.keep_duration.to_ns() * 1e-3))
{
// Implicit conversion to microseconds
keep_duration_us_ = std::chrono::nanoseconds {att.keep_duration.to_ns()};
}
// Restart ack timer with new duration
Expand Down Expand Up @@ -2074,6 +2078,7 @@ bool StatefulWriter::ack_timer_expired()

CacheChange_t* change;

// Skip removed changes until reaching the last change
do
{
last_sequence_number_++;
Expand Down
196 changes: 0 additions & 196 deletions test/blackbox/common/BlackboxTestsAcknackQos.cpp

This file was deleted.

Loading

0 comments on commit 970ee23

Please sign in to comment.