From 20ee02bda38a50a370ff18b794f39e2fe43e3943 Mon Sep 17 00:00:00 2001 From: AraHaan <15173749+AraHaan@users.noreply.github.com> Date: Tue, 19 May 2020 14:35:01 -0400 Subject: [PATCH] Fixed Incorrectly named function arguments in TryGetPlatformSocketOption. (#36694) Fixes #36686. --- .../Native/Unix/System.Native/pal_networking.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libraries/Native/Unix/System.Native/pal_networking.c b/src/libraries/Native/Unix/System.Native/pal_networking.c index 319b5000c46a0..ba58024472b8e 100644 --- a/src/libraries/Native/Unix/System.Native/pal_networking.c +++ b/src/libraries/Native/Unix/System.Native/pal_networking.c @@ -1592,14 +1592,14 @@ int32_t SystemNative_GetSocketErrorOption(intptr_t socket, int32_t* error) return Error_SUCCESS; } -static bool TryGetPlatformSocketOption(int32_t socketOptionName, int32_t socketOptionLevel, int* optLevel, int* optName) +static bool TryGetPlatformSocketOption(int32_t socketOptionLevel, int32_t socketOptionName, int* optLevel, int* optName) { - switch (socketOptionName) + switch (socketOptionLevel) { case SocketOptionLevel_SOL_SOCKET: *optLevel = SOL_SOCKET; - switch (socketOptionLevel) + switch (socketOptionName) { case SocketOptionName_SO_DEBUG: *optName = SO_DEBUG; @@ -1680,7 +1680,7 @@ static bool TryGetPlatformSocketOption(int32_t socketOptionName, int32_t socketO case SocketOptionLevel_SOL_IP: *optLevel = IPPROTO_IP; - switch (socketOptionLevel) + switch (socketOptionName) { case SocketOptionName_SO_IP_OPTIONS: *optName = IP_OPTIONS; @@ -1759,7 +1759,7 @@ static bool TryGetPlatformSocketOption(int32_t socketOptionName, int32_t socketO case SocketOptionLevel_SOL_IPV6: *optLevel = IPPROTO_IPV6; - switch (socketOptionLevel) + switch (socketOptionName) { case SocketOptionName_SO_IPV6_HOPLIMIT: *optName = IPV6_HOPLIMIT; @@ -1793,7 +1793,7 @@ static bool TryGetPlatformSocketOption(int32_t socketOptionName, int32_t socketO case SocketOptionLevel_SOL_TCP: *optLevel = IPPROTO_TCP; - switch (socketOptionLevel) + switch (socketOptionName) { case SocketOptionName_SO_TCP_NODELAY: *optName = TCP_NODELAY; @@ -1825,7 +1825,7 @@ static bool TryGetPlatformSocketOption(int32_t socketOptionName, int32_t socketO case SocketOptionLevel_SOL_UDP: *optLevel = IPPROTO_UDP; - switch (socketOptionLevel) + switch (socketOptionName) { // case SocketOptionName_SO_UDP_NOCHECKSUM: