Skip to content

Commit

Permalink
Fix typo, and add debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakio815 committed Dec 20, 2024
1 parent 6042fbc commit 4f183a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/federated/network/socket_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,14 @@ static int set_socket_bind_option(int socket_descriptor, uint16_t specified_port
struct sockaddr_in assigned;
socklen_t addr_len = sizeof(assigned);
if (getsockname(socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) {
lf_print_error_and_exit("Federate fdailed to retrieve assigned port number.");
lf_print_error_and_exit("Federate failed to retrieve assigned port number.");
}
used_port = ntohs(assigned.sin_port);
}
if (result != 0) {
lf_print_error_and_exit("Failed to bind the socket. Port %d is not available. ", used_port);
}
lf_print_debug("Socket is binded to port %d.", used_port);
return used_port;
}

Expand Down

0 comments on commit 4f183a4

Please sign in to comment.