From 796d5a64a695c87834d6d9e219be1688eb405f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20P=C3=A9rez?= <78275223+jepemi@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:25:45 +0100 Subject: [PATCH 1/3] Remove unnecessary warning (#4217) Signed-off-by: Jesus Perez (cherry picked from commit ab94226160ce8efa3bd566dbf470eb45682151ed) --- src/cpp/rtps/transport/TCPTransportInterface.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cpp/rtps/transport/TCPTransportInterface.cpp b/src/cpp/rtps/transport/TCPTransportInterface.cpp index 651ba841c50..e4ec8f71ea4 100644 --- a/src/cpp/rtps/transport/TCPTransportInterface.cpp +++ b/src/cpp/rtps/transport/TCPTransportInterface.cpp @@ -1169,9 +1169,6 @@ bool TCPTransportInterface::send( { //std::cout << "ChannelLocator: " << IPLocator::to_string(channel->locator()) << std::endl; //std::cout << "RemoteLocator: " << IPLocator::to_string(remote_locator) << std::endl; - - logWarning(RTCP, "SEND [RTPS] Failed: Not connect: " << IPLocator::getLogicalPort(remote_locator) \ - << " @ IP: " << IPLocator::toIPv4string(remote_locator)); return false; } From 6738dd8565e1533c8779e856fe5753bbf86073c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20P=C3=A9rez?= <78275223+jepemi@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:36:34 +0100 Subject: [PATCH 2/3] Fix wrong log info messages on TCP (#4258) Signed-off-by: Jesus Perez (cherry picked from commit 36f7f57b039d9f762c9d04797c5ee5b34ac0ca1d) # Conflicts: # src/cpp/rtps/transport/TCPTransportInterface.cpp --- .../rtps/transport/TCPTransportInterface.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/cpp/rtps/transport/TCPTransportInterface.cpp b/src/cpp/rtps/transport/TCPTransportInterface.cpp index e4ec8f71ea4..48f242fa374 100644 --- a/src/cpp/rtps/transport/TCPTransportInterface.cpp +++ b/src/cpp/rtps/transport/TCPTransportInterface.cpp @@ -805,6 +805,7 @@ void TCPTransportInterface::perform_listen_operation( if (rtcp_message_manager) { channel = channel_weak.lock(); + endpoint_to_locator(channel->remote_endpoint(), remote_locator); if (channel) { @@ -1288,9 +1289,17 @@ void TCPTransportInterface::SocketAccepted( channel->thread(std::thread(&TCPTransportInterface::perform_listen_operation, this, channel_weak_ptr, rtcp_manager_weak_ptr)); +<<<<<<< HEAD logInfo(RTCP, " Accepted connection (local: " << IPLocator::to_string(locator) << ", remote: " << channel->remote_endpoint().address() << ":" << channel->remote_endpoint().port() << ")"); +======= + EPROSIMA_LOG_INFO(RTCP, "Accepted connection (local: " + << channel->local_endpoint().address() << ":" + << channel->local_endpoint().port() << "), remote: " + << channel->remote_endpoint().address() << ":" + << channel->remote_endpoint().port() << ")"); +>>>>>>> 36f7f57b0 (Fix wrong log info messages on TCP (#4258)) } else { @@ -1334,10 +1343,18 @@ void TCPTransportInterface::SecureSocketAccepted( secure_channel->thread(std::thread(&TCPTransportInterface::perform_listen_operation, this, channel_weak_ptr, rtcp_manager_weak_ptr)); +<<<<<<< HEAD logInfo(RTCP, " Accepted connection (local: " << IPLocator::to_string(locator) << ", remote: " << socket->lowest_layer().remote_endpoint().address() << ":" << socket->lowest_layer().remote_endpoint().port() << ")"); +======= + EPROSIMA_LOG_INFO(RTCP, " Accepted connection (local: " + << socket->lowest_layer().local_endpoint().address() << ":" + << socket->lowest_layer().local_endpoint().port() << "), remote: " + << socket->lowest_layer().remote_endpoint().address() << ":" + << socket->lowest_layer().remote_endpoint().port() << ")"); +>>>>>>> 36f7f57b0 (Fix wrong log info messages on TCP (#4258)) } else { From 55a8a44f9c49befd21308f9c2a366322f221b69d Mon Sep 17 00:00:00 2001 From: Jesus Perez Date: Mon, 29 Jan 2024 07:47:47 +0100 Subject: [PATCH 3/3] Refs #20262: Resolve conflicts Signed-off-by: Jesus Perez --- .../rtps/transport/TCPTransportInterface.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/cpp/rtps/transport/TCPTransportInterface.cpp b/src/cpp/rtps/transport/TCPTransportInterface.cpp index 48f242fa374..5955c7abd78 100644 --- a/src/cpp/rtps/transport/TCPTransportInterface.cpp +++ b/src/cpp/rtps/transport/TCPTransportInterface.cpp @@ -1289,17 +1289,11 @@ void TCPTransportInterface::SocketAccepted( channel->thread(std::thread(&TCPTransportInterface::perform_listen_operation, this, channel_weak_ptr, rtcp_manager_weak_ptr)); -<<<<<<< HEAD - logInfo(RTCP, " Accepted connection (local: " << IPLocator::to_string(locator) - << ", remote: " << channel->remote_endpoint().address() - << ":" << channel->remote_endpoint().port() << ")"); -======= - EPROSIMA_LOG_INFO(RTCP, "Accepted connection (local: " + logInfo(RTCP, "Accepted connection (local: " << channel->local_endpoint().address() << ":" << channel->local_endpoint().port() << "), remote: " << channel->remote_endpoint().address() << ":" << channel->remote_endpoint().port() << ")"); ->>>>>>> 36f7f57b0 (Fix wrong log info messages on TCP (#4258)) } else { @@ -1343,18 +1337,11 @@ void TCPTransportInterface::SecureSocketAccepted( secure_channel->thread(std::thread(&TCPTransportInterface::perform_listen_operation, this, channel_weak_ptr, rtcp_manager_weak_ptr)); -<<<<<<< HEAD - logInfo(RTCP, " Accepted connection (local: " << IPLocator::to_string(locator) - << ", remote: " << socket->lowest_layer().remote_endpoint().address() - << ":" << socket->lowest_layer().remote_endpoint().port() << - ")"); -======= - EPROSIMA_LOG_INFO(RTCP, " Accepted connection (local: " + logInfo(RTCP, " Accepted connection (local: " << socket->lowest_layer().local_endpoint().address() << ":" << socket->lowest_layer().local_endpoint().port() << "), remote: " << socket->lowest_layer().remote_endpoint().address() << ":" << socket->lowest_layer().remote_endpoint().port() << ")"); ->>>>>>> 36f7f57b0 (Fix wrong log info messages on TCP (#4258)) } else {