Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakio815 committed Dec 16, 2024
1 parent 671e299 commit b82c3f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/federated/network/socket_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void set_socket_timeout_option(int socket_descriptor, socket_type_t socke
}
}

static int set_socket_bind_option(int socket_descriptor, int port) {
static int set_socket_bind_option(int socket_descriptor, uint16_t port) {
// Server file descriptor.
struct sockaddr_in server_fd;
// Zero out the server address structure.
Expand Down Expand Up @@ -130,9 +130,10 @@ static int set_socket_bind_option(int socket_descriptor, int port) {
if (result != 0) {
lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port);
}
return port;
}

int create_rti_server(uint16_t port, socket_type_t socket_type, int* final_socket, uint16_t* final_port) {
void create_rti_server(uint16_t port, socket_type_t socket_type, int* final_socket, uint16_t* final_port) {

// Create an IPv4 socket for TCP (not UDP) communication over IP (0).
int socket_descriptor = -1;
Expand Down Expand Up @@ -181,6 +182,7 @@ int accept_socket(int socket, struct sockaddr* client_fd) {
continue;
}
}
return socket_id;
}

int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer) {
Expand Down

0 comments on commit b82c3f0

Please # to comment.