mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 12:06:52 +00:00
[ws2_32]
-do not initialize in case of error -don't touch vendor info svn path=/trunk/; revision=62210
This commit is contained in:
parent
3e7bff4631
commit
f5bb0ccda5
2 changed files with 6 additions and 6 deletions
|
@ -116,7 +116,6 @@ WSAStartup(IN WORD wVersionRequested,
|
|||
lpWSAData->wHighVersion = MAKEWORD(2,2);
|
||||
lstrcpyA(lpWSAData->szDescription, "WinSock 2.0");
|
||||
lstrcpyA(lpWSAData->szSystemStatus, "Running");
|
||||
lpWSAData->lpVendorInfo = NULL;
|
||||
|
||||
if (LOBYTE(wVersionRequested) == 1)
|
||||
{
|
||||
|
@ -131,7 +130,8 @@ WSAStartup(IN WORD wVersionRequested,
|
|||
|
||||
/*FIXME: increment internal counter */
|
||||
|
||||
WSASETINITIALIZED;
|
||||
if (ErrorCode == ERROR_SUCCESS)
|
||||
WSASETINITIALIZED;
|
||||
|
||||
return ErrorCode;
|
||||
}
|
||||
|
|
|
@ -861,7 +861,7 @@ gethostbyname(IN CONST CHAR FAR* name)
|
|||
|
||||
p = NtCurrentTeb()->WinSockData;
|
||||
|
||||
if( !p )
|
||||
if (!p || !WSAINITIALIZED)
|
||||
{
|
||||
WSASetLastError( WSANOTINITIALISED );
|
||||
return NULL;
|
||||
|
@ -1130,7 +1130,7 @@ getservbyname(IN CONST CHAR FAR* name,
|
|||
DWORD ReadSize = 0;
|
||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
||||
|
||||
if( !p )
|
||||
if (!p || !WSAINITIALIZED)
|
||||
{
|
||||
WSASetLastError( WSANOTINITIALISED );
|
||||
return NULL;
|
||||
|
@ -1314,7 +1314,7 @@ getservbyport(IN INT port,
|
|||
DWORD ReadSize = 0, ValidData = 0;
|
||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
||||
|
||||
if( !p )
|
||||
if( !p || !WSAINITIALIZED)
|
||||
{
|
||||
WSASetLastError( WSANOTINITIALISED );
|
||||
return NULL;
|
||||
|
@ -1496,7 +1496,7 @@ inet_addr(IN CONST CHAR FAR* cp)
|
|||
|
||||
p = (PCHAR)cp;
|
||||
|
||||
if (!p)
|
||||
if (!p || !WSAINITIALIZED)
|
||||
{
|
||||
WSASetLastError(WSAEFAULT);
|
||||
return INADDR_NONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue