Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e568afa6
Commit
e568afa6
authored
Jun 10, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use IOCTL_AFD_WINE_COMPLETE_ASYNC in SIO_UDP_CONNRESET.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9344a490
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
85 deletions
+13
-85
socket.c
dlls/ws2_32/socket.c
+13
-85
No files found.
dlls/ws2_32/socket.c
View file @
e568afa6
...
@@ -473,8 +473,6 @@ static int ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, in
...
@@ -473,8 +473,6 @@ static int ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, in
int
WSAIOCTL_GetInterfaceCount
(
void
);
int
WSAIOCTL_GetInterfaceCount
(
void
);
int
WSAIOCTL_GetInterfaceName
(
int
intNumber
,
char
*
intName
);
int
WSAIOCTL_GetInterfaceName
(
int
intNumber
,
char
*
intName
);
static
void
WS_AddCompletion
(
SOCKET
sock
,
ULONG_PTR
CompletionValue
,
NTSTATUS
CompletionStatus
,
ULONG
Information
,
BOOL
force
);
#define MAP_OPTION(opt) { WS_##opt, opt }
#define MAP_OPTION(opt) { WS_##opt, opt }
static
const
int
ws_sock_map
[][
2
]
=
static
const
int
ws_sock_map
[][
2
]
=
...
@@ -646,45 +644,6 @@ static UINT wsaErrno(void)
...
@@ -646,45 +644,6 @@ static UINT wsaErrno(void)
return
sock_get_error
(
loc_errno
);
return
sock_get_error
(
loc_errno
);
}
}
static
NTSTATUS
sock_error_to_ntstatus
(
DWORD
err
)
{
switch
(
err
)
{
case
0
:
return
STATUS_SUCCESS
;
case
WSAEBADF
:
return
STATUS_INVALID_HANDLE
;
case
WSAEACCES
:
return
STATUS_ACCESS_DENIED
;
case
WSAEFAULT
:
return
STATUS_ACCESS_VIOLATION
;
case
WSAEINVAL
:
return
STATUS_INVALID_PARAMETER
;
case
WSAEMFILE
:
return
STATUS_TOO_MANY_OPENED_FILES
;
case
WSAEINPROGRESS
:
case
WSAEWOULDBLOCK
:
return
STATUS_DEVICE_NOT_READY
;
case
WSAEALREADY
:
return
STATUS_NETWORK_BUSY
;
case
WSAENOTSOCK
:
return
STATUS_OBJECT_TYPE_MISMATCH
;
case
WSAEDESTADDRREQ
:
return
STATUS_INVALID_PARAMETER
;
case
WSAEMSGSIZE
:
return
STATUS_BUFFER_OVERFLOW
;
case
WSAEPROTONOSUPPORT
:
case
WSAESOCKTNOSUPPORT
:
case
WSAEPFNOSUPPORT
:
case
WSAEAFNOSUPPORT
:
case
WSAEPROTOTYPE
:
return
STATUS_NOT_SUPPORTED
;
case
WSAENOPROTOOPT
:
return
STATUS_INVALID_PARAMETER
;
case
WSAEOPNOTSUPP
:
return
STATUS_NOT_SUPPORTED
;
case
WSAEADDRINUSE
:
return
STATUS_SHARING_VIOLATION
;
case
WSAEADDRNOTAVAIL
:
return
STATUS_INVALID_PARAMETER
;
case
WSAECONNREFUSED
:
return
STATUS_CONNECTION_REFUSED
;
case
WSAESHUTDOWN
:
return
STATUS_PIPE_DISCONNECTED
;
case
WSAENOTCONN
:
return
STATUS_INVALID_CONNECTION
;
case
WSAETIMEDOUT
:
return
STATUS_IO_TIMEOUT
;
case
WSAENETUNREACH
:
return
STATUS_NETWORK_UNREACHABLE
;
case
WSAENETDOWN
:
return
STATUS_NETWORK_BUSY
;
case
WSAECONNRESET
:
return
STATUS_CONNECTION_RESET
;
case
WSAECONNABORTED
:
return
STATUS_CONNECTION_ABORTED
;
default:
FIXME
(
"unmapped error %u
\n
"
,
err
);
return
STATUS_UNSUCCESSFUL
;
}
}
static
DWORD
NtStatusToWSAError
(
NTSTATUS
status
)
static
DWORD
NtStatusToWSAError
(
NTSTATUS
status
)
{
{
static
const
struct
static
const
struct
...
@@ -3224,8 +3183,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
...
@@ -3224,8 +3183,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
DWORD
out_size
,
LPDWORD
ret_size
,
LPWSAOVERLAPPED
overlapped
,
DWORD
out_size
,
LPDWORD
ret_size
,
LPWSAOVERLAPPED
overlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
completion
)
LPWSAOVERLAPPED_COMPLETION_ROUTINE
completion
)
{
{
DWORD
status
=
0
,
total
=
0
;
TRACE
(
"%04lx, %s, %p, %d, %p, %d, %p, %p, %p
\n
"
,
TRACE
(
"%04lx, %s, %p, %d, %p, %d, %p, %p, %p
\n
"
,
s
,
debugstr_wsaioctl
(
code
),
in_buff
,
in_size
,
out_buff
,
out_size
,
ret_size
,
overlapped
,
completion
);
s
,
debugstr_wsaioctl
(
code
),
in_buff
,
in_size
,
out_buff
,
out_size
,
ret_size
,
overlapped
,
completion
);
...
@@ -3290,7 +3247,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
...
@@ -3290,7 +3247,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
case
WS_SIO_ADDRESS_LIST_QUERY
:
case
WS_SIO_ADDRESS_LIST_QUERY
:
{
{
DWORD
size
;
DWORD
size
,
total
;
TRACE
(
"-> SIO_ADDRESS_LIST_QUERY request
\n
"
);
TRACE
(
"-> SIO_ADDRESS_LIST_QUERY request
\n
"
);
...
@@ -3483,10 +3440,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
...
@@ -3483,10 +3440,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
return
ret
?
-
1
:
0
;
return
ret
?
-
1
:
0
;
}
}
case
WS_SIO_UDP_CONNRESET
:
FIXME
(
"WS_SIO_UDP_CONNRESET stub
\n
"
);
break
;
case
WS_SIO_ADDRESS_LIST_CHANGE
:
case
WS_SIO_ADDRESS_LIST_CHANGE
:
{
{
int
force_async
=
!!
overlapped
;
int
force_async
=
!!
overlapped
;
...
@@ -3498,6 +3451,18 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
...
@@ -3498,6 +3451,18 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
return
ret
?
-
1
:
0
;
return
ret
?
-
1
:
0
;
}
}
case
WS_SIO_UDP_CONNRESET
:
{
NTSTATUS
status
=
STATUS_SUCCESS
;
DWORD
ret
;
FIXME
(
"WS_SIO_UDP_CONNRESET stub
\n
"
);
ret
=
server_ioctl_sock
(
s
,
IOCTL_AFD_WINE_COMPLETE_ASYNC
,
&
status
,
sizeof
(
status
),
NULL
,
0
,
ret_size
,
overlapped
,
completion
);
SetLastError
(
ret
);
return
ret
?
-
1
:
0
;
}
default:
default:
FIXME
(
"unimplemented ioctl %s
\n
"
,
debugstr_wsaioctl
(
code
)
);
FIXME
(
"unimplemented ioctl %s
\n
"
,
debugstr_wsaioctl
(
code
)
);
/* fall through */
/* fall through */
...
@@ -3520,27 +3485,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
...
@@ -3520,27 +3485,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
return
-
1
;
return
-
1
;
}
}
}
}
if
(
completion
)
{
FIXME
(
"completion routine %p not supported
\n
"
,
completion
);
}
else
if
(
overlapped
)
{
ULONG_PTR
cvalue
=
(
overlapped
&&
((
ULONG_PTR
)
overlapped
->
hEvent
&
1
)
==
0
)
?
(
ULONG_PTR
)
overlapped
:
0
;
overlapped
->
Internal
=
sock_error_to_ntstatus
(
status
);
overlapped
->
InternalHigh
=
total
;
if
(
cvalue
)
WS_AddCompletion
(
HANDLE2SOCKET
(
s
),
cvalue
,
overlapped
->
Internal
,
total
,
FALSE
);
if
(
overlapped
->
hEvent
)
NtSetEvent
(
overlapped
->
hEvent
,
NULL
);
}
if
(
!
status
)
{
*
ret_size
=
total
;
return
0
;
}
SetLastError
(
status
);
return
SOCKET_ERROR
;
}
}
...
@@ -3922,22 +3866,6 @@ int WINAPI WSAPoll(WSAPOLLFD *wfds, ULONG count, int timeout)
...
@@ -3922,22 +3866,6 @@ int WINAPI WSAPoll(WSAPOLLFD *wfds, ULONG count, int timeout)
return
ret
;
return
ret
;
}
}
/* helper to send completion messages for client-only i/o operation case */
static
void
WS_AddCompletion
(
SOCKET
sock
,
ULONG_PTR
CompletionValue
,
NTSTATUS
CompletionStatus
,
ULONG
Information
,
BOOL
async
)
{
SERVER_START_REQ
(
add_fd_completion
)
{
req
->
handle
=
wine_server_obj_handle
(
SOCKET2HANDLE
(
sock
)
);
req
->
cvalue
=
CompletionValue
;
req
->
status
=
CompletionStatus
;
req
->
information
=
Information
;
req
->
async
=
async
;
wine_server_call
(
req
);
}
SERVER_END_REQ
;
}
/***********************************************************************
/***********************************************************************
* send (WS2_32.19)
* send (WS2_32.19)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment