diff --git a/src/cpp/rtps/transport/TCPTransportInterface.cpp b/src/cpp/rtps/transport/TCPTransportInterface.cpp index 651ba841c50..5955c7abd78 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) { @@ -1169,9 +1170,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; } @@ -1291,9 +1289,11 @@ void TCPTransportInterface::SocketAccepted( channel->thread(std::thread(&TCPTransportInterface::perform_listen_operation, this, channel_weak_ptr, rtcp_manager_weak_ptr)); - logInfo(RTCP, " Accepted connection (local: " << IPLocator::to_string(locator) - << ", remote: " << channel->remote_endpoint().address() - << ":" << channel->remote_endpoint().port() << ")"); + logInfo(RTCP, "Accepted connection (local: " + << channel->local_endpoint().address() << ":" + << channel->local_endpoint().port() << "), remote: " + << channel->remote_endpoint().address() << ":" + << channel->remote_endpoint().port() << ")"); } else { @@ -1337,10 +1337,11 @@ void TCPTransportInterface::SecureSocketAccepted( secure_channel->thread(std::thread(&TCPTransportInterface::perform_listen_operation, this, channel_weak_ptr, rtcp_manager_weak_ptr)); - logInfo(RTCP, " Accepted connection (local: " << IPLocator::to_string(locator) - << ", remote: " << socket->lowest_layer().remote_endpoint().address() - << ":" << socket->lowest_layer().remote_endpoint().port() << - ")"); + 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() << ")"); } else {