Correct optlen when WS_setsockopt is called with SO_LINGER.

This commit is contained in:
Rein Klazes 2002-01-29 17:06:11 +00:00 committed by Alexandre Julliard
parent eb16e1b055
commit e2a55be486

View file

@ -2235,7 +2235,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
/* FIXME: what is documented behavior if SO_LINGER optval
is null?? */
optval = (char*)&linger;
optlen = sizeof(struct WS_linger);
optlen = sizeof(struct linger);
} else if (optlen < sizeof(int)){
woptval= *((INT16 *) optval);
optval= (char*) &woptval;