Skip to content

Commit

Permalink
Fixed Incorrectly named function arguments in TryGetPlatformSocketOpt…
Browse files Browse the repository at this point in the history
…ion. (#36694)

Fixes #36686.
  • Loading branch information
AraHaan committed May 19, 2020
1 parent fdd9b9f commit 20ee02b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/libraries/Native/Unix/System.Native/pal_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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:

Expand Down

0 comments on commit 20ee02b

Please sign in to comment.