Skip to content

Commit

Permalink
Remove commented out code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakio815 committed Dec 18, 2024
1 parent a28e8b7 commit 33cca90
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/federated/RTI/rti_remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,13 +1135,8 @@ static int32_t receive_and_check_fed_id_message(int* socket_id) {
}
federate_info_t* fed = GET_FED_INFO(fed_id);
// The MSG_TYPE_FED_IDS message has the right federation ID.
// Assign the address information for federate.
// The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful
// to create sockets and can be efficiently sent over the network.
// First, convert the sockaddr structure into a sockaddr_in that contains an internet address.
// struct sockaddr_in* pV4_addr = client_fd;
// Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server
// fed->server_ip_addr = pV4_addr->sin_addr;

// Get the peer address from the connected socket_id. Then assign it as the federate's socket server.
struct sockaddr_in peer_addr;
socklen_t addr_len = sizeof(peer_addr);
if (getpeername(*socket_id, (struct sockaddr*)&peer_addr, &addr_len) != 0) {
Expand Down

0 comments on commit 33cca90

Please sign in to comment.