Skip to content

Commit

Permalink
Fix getsockname again
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Sep 8, 2024
1 parent 0f9867b commit 14c4d0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/platform/datapath_epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -1554,11 +1554,12 @@ CxPlatSocketContextAcceptCompletion(
goto Error;
}

socklen_t AssignedLocalAddressLength = sizeof(SocketContext->AcceptSocket->LocalAddress);
int Result =
getsockname(
SocketContext->AcceptSocket->SocketContexts[0].SocketFd,
&SocketContext->AcceptSocket->LocalAddress,
sizeof(SocketContext->AcceptSocket->LocalAddress));
(struct sockaddr*)&SocketContext->AcceptSocket->LocalAddress,
&AssignedLocalAddressLength);
if (Result == SOCKET_ERROR) {
QuicTraceEvent(
DatapathErrorStatus,
Expand Down

0 comments on commit 14c4d0c

Please sign in to comment.