Rebase against 797a746fc2a1b17d67b7423293e081e3e7171033.

This commit is contained in:
Sebastian Lackner
2017-08-12 17:09:40 +02:00
parent 716ea2cef3
commit adb8deeaf2
4 changed files with 35 additions and 67 deletions

View File

@@ -1,4 +1,4 @@
From 2289d4a4f8a8085bd6fd4eebee829ee22df8abc5 Mon Sep 17 00:00:00 2001
From 38b105229bbdeca9a96da1245b7b467a9ef55e89 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 14 Jun 2017 14:47:33 +0200
Subject: ws2_32: Don't skip completion in AcceptEx.
@@ -7,17 +7,17 @@ Spotted by Jacek Caban.
FIXME: It would be better to get rid of the STATUS_MORE_PROCESSING_REQUIRED handling.
---
dlls/ws2_32/socket.c | 13 +++++++------
dlls/ws2_32/socket.c | 15 ++++++++-------
dlls/ws2_32/tests/sock.c | 5 +++++
server/fd.c | 2 +-
server/protocol.def | 1 +
4 files changed, 14 insertions(+), 7 deletions(-)
4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 886ff82dba9..0340547dce0 100644
index 06f1c26d7dd..3f898b494ae 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -654,7 +654,7 @@ static int ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, in
@@ -640,7 +640,7 @@ static int ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, in
int WSAIOCTL_GetInterfaceCount(void);
int WSAIOCTL_GetInterfaceName(int intNumber, char *intName);
@@ -26,7 +26,7 @@ index 886ff82dba9..0340547dce0 100644
#define MAP_OPTION(opt) { WS_##opt, opt }
@@ -2510,7 +2510,7 @@ static NTSTATUS WS2_async_accept_recv( void *user, IO_STATUS_BLOCK *iosb, NTSTAT
@@ -2457,7 +2457,7 @@ static NTSTATUS WS2_async_accept_recv( void *user, IO_STATUS_BLOCK *iosb, NTSTAT
return status;
if (wsa->cvalue)
@@ -35,7 +35,16 @@ index 886ff82dba9..0340547dce0 100644
release_async_io( &wsa->io );
return status;
@@ -5139,7 +5139,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
@@ -3589,7 +3589,7 @@ static BOOL WINAPI WS2_ConnectEx(SOCKET s, const struct WS_sockaddr* name, int n
{
ov->Internal = _get_sock_error(s, FD_CONNECT_BIT);
ov->InternalHigh = 0;
- if (cvalue) WS_AddCompletion( s, cvalue, ov->Internal, ov->InternalHigh );
+ if (cvalue) WS_AddCompletion( s, cvalue, ov->Internal, ov->InternalHigh, FALSE );
if (ov->hEvent) NtSetEvent( ov->hEvent, NULL );
status = STATUS_PENDING;
}
@@ -5068,7 +5068,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
overlapped->Internal = status;
overlapped->InternalHigh = total;
if (overlapped->hEvent) NtSetEvent( overlapped->hEvent, NULL );
@@ -44,7 +53,7 @@ index 886ff82dba9..0340547dce0 100644
}
if (!status)
@@ -5534,7 +5534,7 @@ int WINAPI WSAPoll(WSAPOLLFD *wfds, ULONG count, int timeout)
@@ -5463,7 +5463,7 @@ int WINAPI WSAPoll(WSAPOLLFD *wfds, ULONG count, int timeout)
/* helper to send completion messages for client-only i/o operation case */
static void WS_AddCompletion( SOCKET sock, ULONG_PTR CompletionValue, NTSTATUS CompletionStatus,
@@ -53,7 +62,7 @@ index 886ff82dba9..0340547dce0 100644
{
SERVER_START_REQ( add_fd_completion )
{
@@ -5542,6 +5542,7 @@ static void WS_AddCompletion( SOCKET sock, ULONG_PTR CompletionValue, NTSTATUS C
@@ -5471,6 +5471,7 @@ static void WS_AddCompletion( SOCKET sock, ULONG_PTR CompletionValue, NTSTATUS C
req->cvalue = CompletionValue;
req->status = CompletionStatus;
req->information = Information;
@@ -61,7 +70,7 @@ index 886ff82dba9..0340547dce0 100644
wine_server_call( req );
}
SERVER_END_REQ;
@@ -5686,7 +5687,7 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
@@ -5615,7 +5616,7 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
if (lpNumberOfBytesSent) *lpNumberOfBytesSent = n;
if (!wsa->completion_func)
{
@@ -70,7 +79,7 @@ index 886ff82dba9..0340547dce0 100644
if (lpOverlapped->hEvent) SetEvent( lpOverlapped->hEvent );
HeapFree( GetProcessHeap(), 0, wsa );
}
@@ -7888,7 +7889,7 @@ static int WS2_recv_base( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
@@ -7937,7 +7938,7 @@ static int WS2_recv_base( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
iosb->Information = n;
if (!wsa->completion_func)
{
@@ -80,10 +89,10 @@ index 886ff82dba9..0340547dce0 100644
HeapFree( GetProcessHeap(), 0, wsa );
}
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index acbec940954..c7f0c01112a 100644
index 6a77586ffd0..376532eb27d 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -9939,6 +9939,11 @@ static void test_completion_port(void)
@@ -10003,6 +10003,11 @@ static void test_completion_port(void)
ok(io_port != NULL, "failed to create completion port %u\n", GetLastError());
io_info.Flags = FILE_SKIP_COMPLETION_PORT_ON_SUCCESS;
@@ -96,10 +105,10 @@ index acbec940954..c7f0c01112a 100644
ok(status == STATUS_SUCCESS || broken(status == STATUS_INVALID_INFO_CLASS) /* XP */,
"expected STATUS_SUCCESS, got %08x\n", status);
diff --git a/server/fd.c b/server/fd.c
index 1b82bd30860..94febea990b 100644
index d8f066c7219..e54a81e6a96 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2704,7 +2704,7 @@ DECL_HANDLER(add_fd_completion)
@@ -2547,7 +2547,7 @@ DECL_HANDLER(add_fd_completion)
struct fd *fd = get_handle_fd_obj( current->process, req->handle, 0 );
if (fd)
{
@@ -109,10 +118,10 @@ index 1b82bd30860..94febea990b 100644
release_object( fd );
}
diff --git a/server/protocol.def b/server/protocol.def
index 3912908e519..ba047d5581c 100644
index c91fd0897a2..3e9f255d641 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3725,6 +3725,7 @@ struct handle_info
@@ -3650,6 +3650,7 @@ struct handle_info
apc_param_t cvalue; /* completion value */
apc_param_t information; /* IO_STATUS_BLOCK Information */
unsigned int status; /* completion status */