Skip to content

Commit

Permalink
datapath_winuser: query RioDispatch only if we are using Rio
Browse files Browse the repository at this point in the history
Signed-off-by: Jianye Chen <jianyechen@microsoft.com>
  • Loading branch information
jianye-chen committed Feb 4, 2025
1 parent 1d2b6bd commit cea3c78
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions src/platform/datapath_winuser.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,26 +637,28 @@ CxPlatDataPathQuerySockoptSupport(
goto Error;
}

Result =
WSAIoctl(
UdpSocket,
SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER,
&RioGuid,
sizeof(RioGuid),
&Datapath->RioDispatch,
sizeof(Datapath->RioDispatch),
&BytesReturned,
NULL,
NULL);
if (Result != NO_ERROR) {
int WsaError = WSAGetLastError();
QuicTraceEvent(
LibraryErrorStatus,
"[ lib] ERROR, %u, %s.",
WsaError,
"SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER (RIO)");
Status = HRESULT_FROM_WIN32(WsaError);
goto Error;
if (Datapath->UseRio) {
Result =
WSAIoctl(
UdpSocket,
SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER,
&RioGuid,
sizeof(RioGuid),
&Datapath->RioDispatch,
sizeof(Datapath->RioDispatch),
&BytesReturned,
NULL,
NULL);
if (Result != NO_ERROR) {
int WsaError = WSAGetLastError();
QuicTraceEvent(
LibraryErrorStatus,
"[ lib] ERROR, %u, %s.",
WsaError,
"SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER (RIO)");
Status = HRESULT_FROM_WIN32(WsaError);
goto Error;
}
}

{
Expand Down

0 comments on commit cea3c78

Please sign in to comment.