ws2_32: Set WSAEINVAL on invalid levels in set+getsockopt.

This commit is contained in:
Detlef Riekenberg 2009-08-24 23:39:18 +02:00 committed by Alexandre Julliard
parent 3e87a05476
commit 3d326eb5a8
1 changed files with 4 additions and 2 deletions

View File

@ -2126,7 +2126,8 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
return SOCKET_ERROR;
default:
FIXME("Unknown level: 0x%08x\n", level);
WARN("Unknown level: 0x%08x\n", level);
SetLastError(WSAEINVAL);
return SOCKET_ERROR;
} /* end switch(level) */
}
@ -3277,7 +3278,8 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
break;
default:
FIXME("Unknown level: 0x%08x\n", level);
WARN("Unknown level: 0x%08x\n", level);
SetLastError(WSAEINVAL);
return SOCKET_ERROR;
} /* end switch(level) */