Rebase against aa1580398e4c9eda851d475213e07d865d9238bd.

This commit is contained in:
Sebastian Lackner
2017-04-13 11:52:28 +02:00
parent 830a8b9975
commit 14acf51a2d
12 changed files with 349 additions and 518 deletions

View File

@ -1,4 +1,4 @@
From 3e03add0569ba08db7fae8b167070b0036d52d40 Mon Sep 17 00:00:00 2001
From c9763b1c3d31bdf050339d03935c014ec187e9a4 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 19:08:30 -0700
Subject: ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile.
@ -12,10 +12,10 @@ Subject: ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile.
5 files changed, 75 insertions(+), 11 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 43eafebe78e..64d9ac08175 100644
index cb0e45d29d..22311e8694 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -3034,6 +3034,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
@@ -3019,6 +3019,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
if (status != STATUS_SUCCESS)
return status;
@ -33,7 +33,7 @@ index 43eafebe78e..64d9ac08175 100644
if (wsa->flags & TF_DISCONNECT)
{
/* we can't use WS_closesocket because it modifies the last error */
@@ -3077,7 +3088,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
@@ -3061,7 +3072,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers,
DWORD flags )
{
@ -43,10 +43,10 @@ index 43eafebe78e..64d9ac08175 100644
unsigned int uaddrlen = sizeof(uaddr);
struct ws2_transmitfile_async *wsa;
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 82835036814..2aa9a1b4c22 100644
index 3c68cf597d..1f3d55d202 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -8488,7 +8488,6 @@ static void test_TransmitFile(void)
@@ -8580,7 +8580,6 @@ static void test_TransmitFile(void)
err, WSAENOTSOCK);
/* Test TransmitFile with a UDP datagram socket */
@ -55,7 +55,7 @@ index 82835036814..2aa9a1b4c22 100644
bret = pTransmitFile(client, NULL, 0, 0, NULL, NULL, 0);
err = WSAGetLastError();
diff --git a/include/winsock.h b/include/winsock.h
index cf9adf57ebd..2feb22466e4 100644
index cf9adf57eb..2feb22466e 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -816,6 +816,7 @@ typedef struct WS(WSAData)
@ -67,10 +67,10 @@ index cf9adf57ebd..2feb22466e4 100644
#define FD_WINE_NONBLOCKING 0x20000000
#define FD_WINE_CONNECTED 0x40000000
diff --git a/server/protocol.def b/server/protocol.def
index 60865a6ffc2..2bbad809edb 100644
index 87285a4038..cf5f5376ca 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1303,6 +1303,12 @@ enum server_fd_type
@@ -1299,6 +1299,12 @@ enum server_fd_type
@END
@ -84,7 +84,7 @@ index 60865a6ffc2..2bbad809edb 100644
@REQ(set_socket_event)
obj_handle_t handle; /* handle to the socket */
diff --git a/server/sock.c b/server/sock.c
index d6b4fb2fa5c..2e310eec516 100644
index 1625ed3a42..076c606f5d 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -86,6 +86,7 @@
@ -96,7 +96,7 @@ index d6b4fb2fa5c..2e310eec516 100644
#define FD_WINE_NONBLOCKING 0x20000000
#define FD_WINE_CONNECTED 0x40000000
@@ -132,6 +133,7 @@ static enum server_fd_type sock_get_fd_type( struct fd *fd );
static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async, int blocking );
static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static void sock_queue_async( struct fd *fd, struct async *async, int type, int count );
static void sock_reselect_async( struct fd *fd, struct async_queue *queue );
+static int sock_close_handle( struct object *obj, struct process *process, obj_handle_t handle );