Skip to content

Commit

Permalink
Refs #21293: Windows warnings & eofs
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL committed Oct 3, 2024
1 parent 2574749 commit 4962d18
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/LocalReaderPointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ bool LocalReaderPointer::is_valid()

} // namespace rtps
} // namespace fastdds
} // namespace eprosima
} // namespace eprosima
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/LocalReaderPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ class LocalReaderPointer
} // namespace fastdds
} // namespace eprosima

#endif // FASTDDS_RTPS_WRITER__LOCALREADERPOINTER_HPP
#endif // FASTDDS_RTPS_WRITER__LOCALREADERPOINTER_HPP
6 changes: 3 additions & 3 deletions src/cpp/rtps/reader/LocalReaderView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ void LocalReaderView::dereference()
}

void LocalReaderView::wait_for_references_and_set_status(
size_t references,
size_t n_references,
LocalReaderViewStatus new_status)
{
std::unique_lock<std::mutex> lock(mutex);
if (this->references.load() != references)
if (this->references.load() != n_references)
{
cv.wait(lock, [&]()
{
return this->references.load() == references;
return this->references.load() == n_references;
});
}
status = new_status;
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/LocalReaderView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ class LocalReaderView
} /* namespace fastdds */
} /* namespace eprosima */

#endif // FASTDDS_RTPS_WRITER__LOCALREADERVIEW_HPP
#endif // FASTDDS_RTPS_WRITER__LOCALREADERVIEW_HPP
2 changes: 0 additions & 2 deletions src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ bool StatefulWriter::intraprocess_heartbeat(
bool liveliness)
{
bool returned_value = false;

std::lock_guard<RecursiveTimedMutex> guardW(mp_mutex);
LocalReaderPointer local_reader_pt = reader_proxy->local_reader();

if (local_reader_pt.is_valid())
Expand Down

0 comments on commit 4962d18

Please sign in to comment.