mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
- Call SetLastError/GetLastError to do our work for WSASetLastError/WSAGetLastError
- This will help find regressions before moving to ws2_32_new (ws2_32_new uses this method) svn path=/trunk/; revision=43058
This commit is contained in:
@@ -39,17 +39,7 @@ INT
|
||||
EXPORT
|
||||
WSAGetLastError(VOID)
|
||||
{
|
||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
||||
|
||||
if (p)
|
||||
{
|
||||
return p->LastErrorValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: What error code should we use here? Can this even happen? */
|
||||
return ERROR_BAD_ENVIRONMENT;
|
||||
}
|
||||
return GetLastError();
|
||||
}
|
||||
|
||||
|
||||
@@ -60,10 +50,7 @@ VOID
|
||||
EXPORT
|
||||
WSASetLastError(IN INT iError)
|
||||
{
|
||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
||||
|
||||
if (p)
|
||||
p->LastErrorValue = iError;
|
||||
SetLastError(iError);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user