@@ -396,24 +396,24 @@ static BOOL socket_list_add(SOCKET socket)
396
396
}
397
397
398
398
399
- static BOOL socket_list_find ( SOCKET socket )
400
- {
401
- unsigned int i ;
402
-
403
- if (!socket ) return FALSE;
404
-
405
- EnterCriticalSection ( & cs_socket_list );
406
- for (i = 0 ; i < socket_list_size ; ++ i )
407
- {
408
- if (socket_list [i ] == socket )
409
- {
410
- LeaveCriticalSection ( & cs_socket_list );
411
- return TRUE;
412
- }
413
- }
414
- LeaveCriticalSection ( & cs_socket_list );
415
- return FALSE;
416
- }
399
+ // static BOOL socket_list_find( SOCKET socket )
400
+ // {
401
+ // unsigned int i;
402
+ //
403
+ // if (!socket) return FALSE;
404
+ //
405
+ // EnterCriticalSection( &cs_socket_list );
406
+ // for (i = 0; i < socket_list_size; ++i)
407
+ // {
408
+ // if (socket_list[i] == socket)
409
+ // {
410
+ // LeaveCriticalSection( &cs_socket_list );
411
+ // return TRUE;
412
+ // }
413
+ // }
414
+ // LeaveCriticalSection( &cs_socket_list );
415
+ // return FALSE;
416
+ // }
417
417
418
418
419
419
static BOOL socket_list_remove ( SOCKET socket )
@@ -1000,11 +1000,11 @@ static int WS2_sendto( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD *ret
1000
1000
"addr_len %d, overlapped %p, completion %p\n" ,
1001
1001
s , buffers , buffer_count , flags , addr , addr_len , overlapped , completion );
1002
1002
1003
- if (!socket_list_find ( s ))
1004
- {
1005
- SetLastError ( WSAENOTSOCK );
1006
- return -1 ;
1007
- }
1003
+ // if (!socket_list_find( s ))
1004
+ // {
1005
+ // SetLastError( WSAENOTSOCK );
1006
+ // return -1;
1007
+ // }
1008
1008
1009
1009
if (!overlapped && !ret_size )
1010
1010
{
@@ -1518,11 +1518,11 @@ int WINAPI getpeername( SOCKET s, struct sockaddr *addr, int *len )
1518
1518
1519
1519
TRACE ( "socket %#Ix, addr %p, len %d\n" , s , addr , len ? * len : 0 );
1520
1520
1521
- if (!socket_list_find ( s ))
1522
- {
1523
- WSASetLastError ( WSAENOTSOCK );
1524
- return -1 ;
1525
- }
1521
+ // if (!socket_list_find( s ))
1522
+ // {
1523
+ // WSASetLastError( WSAENOTSOCK );
1524
+ // return -1;
1525
+ // }
1526
1526
1527
1527
/* Windows checks the validity of the socket before checking len, so
1528
1528
* let wineserver do the same. Since len being NULL and *len being 0
@@ -1590,11 +1590,11 @@ int WINAPI getsockopt( SOCKET s, int level, int optname, char *optval, int *optl
1590
1590
1591
1591
if ((level != SOL_SOCKET || optname != SO_OPENTYPE ))
1592
1592
{
1593
- if (!socket_list_find ( s ))
1594
- {
1595
- SetLastError ( WSAENOTSOCK );
1596
- return SOCKET_ERROR ;
1597
- }
1593
+ // if (!socket_list_find( s ))
1594
+ // {
1595
+ // SetLastError( WSAENOTSOCK );
1596
+ // return SOCKET_ERROR;
1597
+ // }
1598
1598
if (!optlen || * optlen <= 0 )
1599
1599
{
1600
1600
SetLastError ( WSAEFAULT );
@@ -2993,7 +2993,7 @@ int WINAPI WSAPoll( WSAPOLLFD *fds, ULONG count, int timeout )
2993
2993
{
2994
2994
unsigned int flags = AFD_POLL_HUP | AFD_POLL_RESET | AFD_POLL_CONNECT_ERR ;
2995
2995
2996
- if ((INT_PTR )fds [i ].fd < 0 || !socket_list_find ( fds [i ].fd ))
2996
+ if ((INT_PTR )fds [i ].fd < 0 /* || !socket_list_find( fds[i].fd )*/ )
2997
2997
{
2998
2998
fds [i ].revents = POLLNVAL ;
2999
2999
continue ;
@@ -3768,11 +3768,11 @@ BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
3768
3768
return FALSE;
3769
3769
}
3770
3770
3771
- if (!socket_list_find ( s ))
3772
- {
3773
- SetLastError ( WSAENOTSOCK );
3774
- return FALSE;
3775
- }
3771
+ // if (!socket_list_find( s ))
3772
+ // {
3773
+ // SetLastError( WSAENOTSOCK );
3774
+ // return FALSE;
3775
+ // }
3776
3776
3777
3777
/* Paired with the write-release in set_async_iosb() in ntdll; see the
3778
3778
* latter for details. */
0 commit comments