From c3e624202c238907ac7718b97c370e7f38bafa86 Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Fri, 16 Feb 2024 09:06:26 +0100 Subject: [PATCH] Fix Conflicts Signed-off-by: cferreiragonz --- src/cpp/fastdds/publisher/DataWriterImpl.hpp | 9 +++------ src/cpp/rtps/transport/TCPChannelResource.cpp | 2 +- src/cpp/rtps/transport/TCPTransportInterface.cpp | 11 ++++------- src/cpp/rtps/transport/tcp/RTCPMessageManager.cpp | 2 +- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.hpp b/src/cpp/fastdds/publisher/DataWriterImpl.hpp index 26f35deb464..bbdcdafa9c5 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.hpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.hpp @@ -334,18 +334,15 @@ class DataWriterImpl : protected rtps::IReaderDataFilter DataWriterQos qos_; - //! DataWriterListener - DataWriterListener* listener_ = nullptr; - - //! Mutex to protect listener_ - std::mutex listener_mutex_; - //!History DataWriterHistory history_; //! DataWriterListener DataWriterListener* listener_ = nullptr; + //! Mutex to protect listener_ + std::mutex listener_mutex_; + //!Listener to capture the events of the Writer class InnerDataWriterListener : public fastrtps::rtps::WriterListener { diff --git a/src/cpp/rtps/transport/TCPChannelResource.cpp b/src/cpp/rtps/transport/TCPChannelResource.cpp index d5fdc1a680d..fcf816cbc6c 100644 --- a/src/cpp/rtps/transport/TCPChannelResource.cpp +++ b/src/cpp/rtps/transport/TCPChannelResource.cpp @@ -84,7 +84,7 @@ ResponseCode TCPChannelResource::process_bind_request( if (connection_status_.compare_exchange_strong(expected, eConnectionStatus::eEstablished)) { locator_ = IPLocator::toPhysicalLocator(locator); - logInfo(RTCP_MSG, "Connection Stablished"); + logInfo(RTCP_MSG, "Connection Established"); return RETCODE_OK; } else if (expected == eConnectionStatus::eEstablished) diff --git a/src/cpp/rtps/transport/TCPTransportInterface.cpp b/src/cpp/rtps/transport/TCPTransportInterface.cpp index b5b4a8b120e..3145c063cd9 100644 --- a/src/cpp/rtps/transport/TCPTransportInterface.cpp +++ b/src/cpp/rtps/transport/TCPTransportInterface.cpp @@ -654,10 +654,9 @@ bool TCPTransportInterface::OpenOutputChannel( // At this point, if there is no SenderResource to reuse, this is the first call to OpenOutputChannel for this locator. // Need to check if a channel already exists for this locator. - std::unique_lock scopedLock(sockets_map_mutex_); - logInfo(RTCP, "Called to OpenOutputChannel (physical: " << IPLocator::getPhysicalPort(locator) << "; logical: " - << IPLocator::getLogicalPort( - locator) << ") @ " << IPLocator::to_string(locator)); + logInfo(RTCP, "Called to OpenOutputChannel (physical: " << IPLocator::getPhysicalPort(locator) << "; logical: " + << IPLocator::getLogicalPort( + locator) << ") @ " << IPLocator::to_string(locator)); std::lock_guard socketsLock(sockets_map_mutex_); auto channel_resource = channel_resources_.find(physical_locator); @@ -725,7 +724,7 @@ bool TCPTransportInterface::OpenOutputChannel( { // Server side LARGE_DATA // Act as server and wait to the other endpoint to connect. Add locator to sender_resource_list - EPROSIMA_LOG_INFO(OpenOutputChannel, "OpenOutputChannel: [WAIT_CONNECTION] (physical: " + logInfo(OpenOutputChannel, "OpenOutputChannel: [WAIT_CONNECTION] (physical: " << IPLocator::getPhysicalPort(locator) << "; logical: " << IPLocator::getLogicalPort(locator) << ") @ " << IPLocator::to_string(locator)); } @@ -1195,8 +1194,6 @@ bool TCPTransportInterface::send( if (locator_mismatch || send_buffer_size > configuration()->sendBufferSize) { - logWarning(RTCP, "SEND [RTPS] Failed: Not connect: " << IPLocator::getLogicalPort(remote_locator) \ - << " @ IP: " << IPLocator::toIPv4string(remote_locator)); return false; } diff --git a/src/cpp/rtps/transport/tcp/RTCPMessageManager.cpp b/src/cpp/rtps/transport/tcp/RTCPMessageManager.cpp index 4d2c9ee5799..2252c9d594f 100644 --- a/src/cpp/rtps/transport/tcp/RTCPMessageManager.cpp +++ b/src/cpp/rtps/transport/tcp/RTCPMessageManager.cpp @@ -479,7 +479,7 @@ ResponseCode RTCPMessageManager::processOpenLogicalPortRequest( if (!channel->connection_established() && channel->connection_status_ != TCPChannelResource::eConnectionStatus::eWaitingForBindResponse) { - EPROSIMA_LOG_ERROR(RTCP, "Trying to send [OPEN_LOGICAL_PORT_RESPONSE] without connection established."); + logError(RTCP, "Trying to send [OPEN_LOGICAL_PORT_RESPONSE] without connection established."); sendData(channel, CHECK_LOGICAL_PORT_RESPONSE, transaction_id, nullptr, RETCODE_SERVER_ERROR); } else if (request.logicalPort() == 0 || !mTransport->is_input_port_open(request.logicalPort()))