Author: cgutman
Date: Wed Sep 16 00:21:27 2009
New Revision: 43058
URL:
http://svn.reactos.org/svn/reactos?rev=43058&view=rev
Log:
- 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)
Modified:
trunk/reactos/dll/win32/ws2_32/misc/dllmain.c
Modified: trunk/reactos/dll/win32/ws2_32/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/misc/dllm…
==============================================================================
--- trunk/reactos/dll/win32/ws2_32/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ws2_32/misc/dllmain.c [iso-8859-1] Wed Sep 16 00:21:27 2009
@@ -39,17 +39,7 @@
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 @@
EXPORT
WSASetLastError(IN INT iError)
{
- PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
-
- if (p)
- p->LastErrorValue = iError;
+ SetLastError(iError);
}