Skip to content

Commit

Permalink
Fix computation of size to send in getsockname in websocket_to_posix_…
Browse files Browse the repository at this point in the history
…socket.c

...that appears to have been bogus ever since
31309a8 "full_posix_sockets (emscripten-core#7672)"
  • Loading branch information
stbergmann committed Aug 22, 2024
1 parent 7f8a05d commit 53ad745
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/lib/websocket/websocket_to_posix_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ int getsockname(int socket, struct sockaddr *address, socklen_t *address_len) {
d.header.function = POSIX_SOCKET_MSG_GETSOCKNAME;
d.socket = socket;
d.address_len = *address_len;
emscripten_websocket_send_binary(bridgeSocket, &d, sizeof(d) + *address_len - MAX_SOCKADDR_SIZE);
emscripten_websocket_send_binary(bridgeSocket, &d, sizeof(d));

wait_for_call_result(b);
int ret = b->data->ret;
Expand Down

0 comments on commit 53ad745

Please sign in to comment.