Skip to content

Commit

Permalink
Minor fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakio815 committed Dec 21, 2024
1 parent 30a9446 commit 276d7b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/federated/RTI/rti_remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ void* federate_info_thread_TCP(void* fed) {
// Nothing more to do. Close the socket and exit.
// Prevent multiple threads from closing the same socket at the same time.
LF_MUTEX_LOCK(&rti_mutex);
shutdown_socket(my_fed->socket, false); // from unistd.h
shutdown_socket(&my_fed->socket, false); // from unistd.h
LF_MUTEX_UNLOCK(&rti_mutex);
// FIXME: We need better error handling here, but do not stop execution here.
break;
Expand Down Expand Up @@ -1007,7 +1007,7 @@ void send_reject(int* socket_id, unsigned char error_code) {
lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket.");
}
// Close the socket without reading until EOF.
shutdown_socket(socket_id, false);
shutdown_socket(&socket_id, false);
LF_MUTEX_UNLOCK(&rti_mutex);
}

Expand Down
6 changes: 3 additions & 3 deletions core/federated/federate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) {
// Ignore errors on this response.
write_to_socket(socket_id, 2, response);
}
shutdown_socket(socket_id, false);
shutdown_socket(&socket_id, false);
continue;
}

Expand All @@ -2013,7 +2013,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) {
// Ignore errors on this response.
write_to_socket(socket_id, 2, response);
}
shutdown_socket(socket_id, false);
shutdown_socket(&socket_id, false);
continue;
}

Expand Down Expand Up @@ -2051,7 +2051,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) {
// Failed to create a listening thread.
LF_MUTEX_LOCK(&socket_mutex);
if (_fed.sockets_for_inbound_p2p_connections[remote_fed_id] != -1) {
shutdown_socket(socket_id, false);
shutdown_socket(&socket_id, false);
_fed.sockets_for_inbound_p2p_connections[remote_fed_id] = -1;
}
LF_MUTEX_UNLOCK(&socket_mutex);
Expand Down

0 comments on commit 276d7b4

Please sign in to comment.