Skip to content

Commit

Permalink
Fix wrong log info messages on TCP (#4258)
Browse files Browse the repository at this point in the history
Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
  • Loading branch information
jepemi authored Jan 22, 2024
1 parent ab94226 commit 36f7f57
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/cpp/rtps/transport/TCPTransportInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ void TCPTransportInterface::perform_listen_operation(
if (rtcp_message_manager)
{
channel = channel_weak.lock();
endpoint_to_locator(channel->remote_endpoint(), remote_locator);

if (channel)
{
Expand Down Expand Up @@ -1360,7 +1361,8 @@ void TCPTransportInterface::SocketAccepted(
create_listening_thread(channel);

EPROSIMA_LOG_INFO(RTCP, "Accepted connection (local: "
<< IPLocator::to_string(locator) << ", remote: "
<< channel->local_endpoint().address() << ":"
<< channel->local_endpoint().port() << "), remote: "
<< channel->remote_endpoint().address() << ":"
<< channel->remote_endpoint().port() << ")");
}
Expand Down Expand Up @@ -1403,10 +1405,11 @@ void TCPTransportInterface::SecureSocketAccepted(
secure_channel->set_options(configuration());
create_listening_thread(secure_channel);

EPROSIMA_LOG_INFO(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() << ")");
}
else
{
Expand Down

0 comments on commit 36f7f57

Please sign in to comment.