Rebase against upstream changes.

This commit is contained in:
Sebastian Lackner
2015-05-06 17:34:48 +02:00
parent 0c248ecda3
commit 8ace9d57c0
4 changed files with 100 additions and 90 deletions

View File

@ -1,4 +1,4 @@
From c3dd4a094fe7ab0c3cd3934c4e30ce228e24aeb3 Mon Sep 17 00:00:00 2001
From 0b55083552779d1148c04778f5479e5fc4e6d6e4 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 5c4a183..a29bcaa 100644
index f530a94..bf33e25 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2645,6 +2645,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
@@ -2810,6 +2810,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
if (status != STATUS_SUCCESS)
return status;
@ -33,7 +33,7 @@ index 5c4a183..a29bcaa 100644
if (wsa->flags & TF_DISCONNECT)
{
/* we can't use WS_closesocket because it modifies the last error */
@@ -2690,7 +2701,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
@@ -2853,7 +2864,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 5c4a183..a29bcaa 100644
union generic_unix_sockaddr uaddr;
unsigned int uaddrlen = sizeof(uaddr);
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 36920a7..3fc8599 100644
index a8abdee..58d8db7 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -7153,7 +7153,6 @@ static void test_TransmitFile(void)
@@ -7566,7 +7566,6 @@ static void test_TransmitFile(void)
err, WSAENOTSOCK);
/* Test TransmitFile with a UDP datagram socket */
@ -67,10 +67,10 @@ index 50237e8..e53aa1e 100644
#define FD_WINE_NONBLOCKING 0x20000000
#define FD_WINE_CONNECTED 0x40000000
diff --git a/server/protocol.def b/server/protocol.def
index 7ec380b..e76bcb1 100644
index 9c4dab4..0694f99 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1209,6 +1209,12 @@ enum server_fd_type
@@ -1230,6 +1230,12 @@ enum server_fd_type
@END
@ -84,7 +84,7 @@ index 7ec380b..e76bcb1 100644
@REQ(set_socket_event)
obj_handle_t handle; /* handle to the socket */
diff --git a/server/sock.c b/server/sock.c
index f3bab85..46bd2f7 100644
index c4dcf6f..fb80bc7 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -86,6 +86,7 @@
@ -95,15 +95,15 @@ index f3bab85..46bd2f7 100644
#define FD_WINE_LISTENING 0x10000000
#define FD_WINE_NONBLOCKING 0x20000000
#define FD_WINE_CONNECTED 0x40000000
@@ -135,6 +136,7 @@ static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, const async_da
@@ -134,6 +135,7 @@ static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, const async_da
static void sock_queue_async( struct fd *fd, const async_data_t *data, int type, int count );
static void sock_reselect_async( struct fd *fd, struct async_queue *queue );
static void sock_cancel_async( struct fd *fd, struct process *process, struct thread *thread, client_ptr_t iosb );
static int sock_cancel_async( struct fd *fd, struct process *process, struct thread *thread, client_ptr_t iosb );
+static int sock_close_handle( struct object *obj, struct process *process, obj_handle_t handle );
static int sock_get_ntstatus( int err );
static int sock_get_error( int err );
@@ -156,7 +158,7 @@ static const struct object_ops sock_ops =
@@ -155,7 +157,7 @@ static const struct object_ops sock_ops =
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_open_file, /* open_file */
@ -112,7 +112,7 @@ index f3bab85..46bd2f7 100644
sock_destroy /* destroy */
};
@@ -627,6 +629,47 @@ static struct fd *sock_get_fd( struct object *obj )
@@ -628,6 +630,47 @@ static struct fd *sock_get_fd( struct object *obj )
return (struct fd *)grab_object( sock->fd );
}
@ -160,7 +160,7 @@ index f3bab85..46bd2f7 100644
static void sock_destroy( struct object *obj )
{
struct sock *sock = (struct sock *)obj;
@@ -678,15 +721,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne
@@ -679,15 +722,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne
struct sock *sock;
int sockfd;
@ -177,7 +177,7 @@ index f3bab85..46bd2f7 100644
if (!(sock = alloc_object( &sock_ops )))
{
close( sockfd );
@@ -1282,6 +1318,17 @@ DECL_HANDLER(accept_into_socket)
@@ -1286,6 +1322,17 @@ DECL_HANDLER(accept_into_socket)
release_object( sock );
}
@ -196,5 +196,5 @@ index f3bab85..46bd2f7 100644
DECL_HANDLER(set_socket_event)
{
--
2.3.0
2.3.7