Commit 3e87a054 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

ws2_32: Use only the lower 16 bit as level when calling [g|s]etsockopt from 16 bit.

parent 1b3027f3
...@@ -294,8 +294,9 @@ INT16 WINAPI getsockopt16(SOCKET16 s, INT16 level, INT16 optname, char *optval, ...@@ -294,8 +294,9 @@ INT16 WINAPI getsockopt16(SOCKET16 s, INT16 level, INT16 optname, char *optval,
INT optlen32; INT optlen32;
INT *p = &optlen32; INT *p = &optlen32;
INT retVal; INT retVal;
if( optlen ) optlen32 = *optlen; else p = NULL; if( optlen ) optlen32 = *optlen; else p = NULL;
retVal = WS_getsockopt( s, level, optname, optval, p ); retVal = WS_getsockopt( s, (WORD)level, optname, optval, p );
if( optlen ) *optlen = optlen32; if( optlen ) *optlen = optlen32;
return retVal; return retVal;
} }
...@@ -397,7 +398,7 @@ INT16 WINAPI setsockopt16(SOCKET16 s, INT16 level, INT16 optname, ...@@ -397,7 +398,7 @@ INT16 WINAPI setsockopt16(SOCKET16 s, INT16 level, INT16 optname,
char *optval, INT16 optlen) char *optval, INT16 optlen)
{ {
if( !optval ) return SOCKET_ERROR; if( !optval ) return SOCKET_ERROR;
return WS_setsockopt( s, level, optname, optval, optlen ); return WS_setsockopt( s, (WORD)level, optname, optval, optlen );
} }
/*********************************************************************** /***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment