Rebase against 7e1522cdd69587b59f97a3b3c755cef40a52070e.

This commit is contained in:
Sebastian Lackner 2017-07-08 16:11:26 +02:00
parent b888a45d12
commit de4694c81b
6 changed files with 149 additions and 138 deletions

View File

@ -1,17 +1,17 @@
From 9fc1b0617a1bf5136389984b9931ab92a42e56dc Mon Sep 17 00:00:00 2001
From 9c2428d179473d7bd8e383132e408edd330f8e80 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 9 Apr 2017 03:13:25 +0200
Subject: server: Skip async completion when possible.
---
dlls/ntdll/tests/pipe.c | 2 --
server/async.c | 12 +++++++++++-
server/fd.c | 4 ++++
server/file.h | 1 +
4 files changed, 16 insertions(+), 3 deletions(-)
server/async.c | 10 ++++++++--
server/fd.c | 8 ++++----
server/file.h | 2 +-
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c
index 6846b514dc2..a6f8135624a 100644
index bda9a144ade..aa240edea21 100644
--- a/dlls/ntdll/tests/pipe.c
+++ b/dlls/ntdll/tests/pipe.c
@@ -389,9 +389,7 @@ static void test_completion(void)
@ -25,97 +25,108 @@ index 6846b514dc2..a6f8135624a 100644
CloseHandle(ov.hEvent);
diff --git a/server/async.c b/server/async.c
index f50cdc5a45a..d222287c30b 100644
index 3a83a6302bf..770ed493819 100644
--- a/server/async.c
+++ b/server/async.c
@@ -45,6 +45,7 @@ struct async
struct timeout_user *timeout;
unsigned int timeout_status; /* status to report upon timeout */
int signaled;
+ int skip_completion; /* skip completion */
struct event *event;
async_data_t data; /* data for async I/O call */
@@ -51,6 +51,7 @@ struct async
struct iosb *iosb; /* I/O status block */
@@ -180,6 +181,14 @@ static void async_queue_destroy( struct object *obj )
if (async_queue->completion) release_object( async_queue->completion );
}
obj_handle_t wait_handle; /* pre-allocated wait handle */
int direct_result; /* a flag if we're passing result directly from request instead of APC */
+ unsigned int comp_flags; /* completion flags */
};
+void async_skip_completion( struct async *async, int comp_flags )
+{
+ if (!async->data.user) return;
+ if (!(comp_flags & COMPLETION_SKIP_ON_SUCCESS)) return;
+ async->skip_completion = (async->status == STATUS_SUCCESS ||
+ async->status == STATUS_ALERTED);
+}
+
/* notifies client thread of new status of its async request */
void async_terminate( struct async *async, unsigned int status )
{
@@ -278,6 +287,7 @@ struct async *create_async( struct thread *thread, const async_data_t *data, str
async->queue = NULL;
async->signaled = 0;
async->wait_handle = 0;
+ async->skip_completion = 0;
static void async_dump( struct object *obj, int verbose );
@@ -294,6 +295,7 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
async->signaled = 0;
async->wait_handle = 0;
async->direct_result = 0;
+ async->comp_flags = 0;
if (iosb) async->iosb = (struct iosb *)grab_object( iosb );
else async->iosb = NULL;
@@ -384,7 +394,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
async->status = status;
if (status == STATUS_MORE_PROCESSING_REQUIRED) return; /* don't report the completion */
@@ -306,7 +308,7 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
- if (async->queue && !async->data.apc && async->data.apc_context)
+ if (async->queue && !async->data.apc && async->data.apc_context && !async->skip_completion)
add_async_completion( async->queue, async->data.apc_context, status, total );
if (async->data.apc)
{
/* create an async associated with iosb for async-based requests
* returned async must be passed to async_handoff */
-struct async *create_request_async( struct fd *fd, const async_data_t *data )
+struct async *create_request_async( struct fd *fd, unsigned int comp_flags, const async_data_t *data )
{
struct async *async;
struct iosb *iosb;
@@ -324,6 +326,7 @@ struct async *create_request_async( struct fd *fd, const async_data_t *data )
return NULL;
}
async->direct_result = 1;
+ async->comp_flags = comp_flags;
}
return async;
}
@@ -438,8 +441,11 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
data.user.args[2] = 0;
thread_queue_apc( async->thread, NULL, &data );
}
- else if (async->data.apc_context)
+ else if (async->data.apc_context && (!async->direct_result ||
+ !(async->comp_flags & COMPLETION_SKIP_ON_SUCCESS)))
+ {
add_async_completion( async, async->data.apc_context, status, total );
+ }
if (async->event) set_event( async->event );
else if (async->fd) set_fd_signaled( async->fd, 1 );
diff --git a/server/fd.c b/server/fd.c
index a2640468644..75cb9bff945 100644
index 6747aaabdb4..2a8ecb12b8e 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2381,6 +2381,7 @@ DECL_HANDLER(flush)
if (async)
@@ -2377,7 +2377,7 @@ DECL_HANDLER(flush)
if (!fd) return;
- if ((async = create_request_async( fd, &req->async )))
+ if ((async = create_request_async( fd, fd->comp_flags, &req->async )))
{
reply->event = fd->fd_ops->flush( fd, async );
+ async_skip_completion( async, fd->comp_flags );
reply->event = async_handoff( async, fd->fd_ops->flush( fd, async ), NULL );
release_object( async );
}
release_object( fd );
@@ -2457,6 +2458,7 @@ DECL_HANDLER(read)
@@ -2452,7 +2452,7 @@ DECL_HANDLER(read)
if (!fd) return;
- if ((async = create_request_async( fd, &req->async )))
+ if ((async = create_request_async( fd, fd->comp_flags, &req->async )))
{
reply->wait = async_handoff( async, fd->fd_ops->read( fd, async, req->pos ) );
reply->wait = async_handoff( async, fd->fd_ops->read( fd, async, req->pos ), NULL );
reply->options = fd->options;
@@ -2469,7 +2469,7 @@ DECL_HANDLER(write)
if (!fd) return;
- if ((async = create_request_async( fd, &req->async )))
+ if ((async = create_request_async( fd, fd->comp_flags, &req->async )))
{
reply->wait = async_handoff( async, fd->fd_ops->write( fd, async, req->pos ), &reply->size );
reply->options = fd->options;
@@ -2487,7 +2487,7 @@ DECL_HANDLER(ioctl)
if (!fd) return;
- if ((async = create_request_async( fd, &req->async )))
+ if ((async = create_request_async( fd, fd->comp_flags, &req->async )))
{
reply->wait = async_handoff( async, fd->fd_ops->ioctl( fd, req->code, async ), NULL );
reply->options = fd->options;
+ async_skip_completion( async, fd->comp_flags );
release_object( async );
}
release_object( fd );
@@ -2478,6 +2480,7 @@ DECL_HANDLER(write)
{
reply->wait = fd->fd_ops->write( fd, async, req->pos );
reply->options = fd->options;
+ async_skip_completion( async, fd->comp_flags );
release_object( async );
}
release_object( iosb );
@@ -2501,6 +2504,7 @@ DECL_HANDLER(ioctl)
{
reply->wait = fd->fd_ops->ioctl( fd, req->code, async );
reply->options = fd->options;
+ async_skip_completion( async, fd->comp_flags );
release_object( async );
}
release_object( iosb );
diff --git a/server/file.h b/server/file.h
index 8cc4d3beab2..f4482982cfe 100644
index 386f76c4be2..1c9c66fdad1 100644
--- a/server/file.h
+++ b/server/file.h
@@ -183,6 +183,7 @@ extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned
extern void async_set_result( struct object *obj, unsigned int status, apc_param_t total );
extern int async_queued( struct async_queue *queue );
extern int async_waiting( struct async_queue *queue );
+extern void async_skip_completion( struct async *async, int comp_flags );
extern void async_terminate( struct async *async, unsigned int status );
extern void async_wake_up( struct async_queue *queue, unsigned int status );
extern struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key );
@@ -176,7 +176,7 @@ extern struct object *create_serial( struct fd *fd );
extern struct async_queue *create_async_queue( struct fd *fd );
extern void free_async_queue( struct async_queue *queue );
extern struct async *create_async( struct fd *fd, struct thread *thread, const async_data_t *data, struct iosb *iosb );
-extern struct async *create_request_async( struct fd *fd, const async_data_t *data );
+extern struct async *create_request_async( struct fd *fd, unsigned int comp_flags, const async_data_t *data );
extern obj_handle_t async_handoff( struct async *async, int success, data_size_t *result );
extern void queue_async( struct async_queue *queue, struct async *async );
extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status );
--
2.13.1

View File

@ -1,4 +1,4 @@
From 1b04ab2a2725ab5f5f4afafbc4c0ea05b15368af Mon Sep 17 00:00:00 2001
From 76d196e4f7e4b4a74dbd4777a29a39a3baf3762d Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:56:49 -0700
Subject: ntdll: Add support for junction point creation.
@ -12,7 +12,7 @@ Subject: ntdll: Add support for junction point creation.
create mode 100644 include/ntifs.h
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index b3f4f234107..51a623d1eea 100644
index 9ebcdd54bc3..0ebbd3a90ec 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -108,12 +108,14 @@
@ -30,7 +30,7 @@ index b3f4f234107..51a623d1eea 100644
#define SECSPERDAY 86400
#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY)
@@ -1671,6 +1673,76 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
@@ -1655,6 +1657,76 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
}
@ -107,7 +107,7 @@ index b3f4f234107..51a623d1eea 100644
/**************************************************************************
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
@@ -1823,11 +1895,30 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
@@ -1807,11 +1879,30 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
}
break;
}
@ -135,11 +135,11 @@ index b3f4f234107..51a623d1eea 100644
+ break;
+ }
+
case FSCTL_PIPE_WAIT:
default:
status = server_ioctl_file( handle, event, apc, apc_context, io, code,
return server_ioctl_file( handle, event, apc, apc_context, io, code,
in_buffer, in_size, out_buffer, out_size );
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index ba28782107d..07328b62414 100644
index f66ac1d74f0..86fd6d0bc65 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -37,6 +37,7 @@
@ -150,7 +150,7 @@ index ba28782107d..07328b62414 100644
#ifndef IO_COMPLETION_ALL_ACCESS
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
@@ -4534,6 +4535,98 @@ static void test_query_ea(void)
@@ -4378,6 +4379,98 @@ static void test_query_ea(void)
#undef EA_BUFFER_SIZE
}
@ -249,17 +249,17 @@ index ba28782107d..07328b62414 100644
START_TEST(file)
{
HMODULE hkernel32 = GetModuleHandleA("kernel32.dll");
@@ -4599,4 +4692,5 @@ START_TEST(file)
@@ -4444,4 +4537,5 @@ START_TEST(file)
test_ioctl();
test_flush_buffers_file();
test_query_ea();
+ test_junction_points();
}
diff --git a/include/Makefile.in b/include/Makefile.in
index 4fbfd16bf58..7d64aafcab3 100644
index 1dd6aafa324..31a6ac1d441 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -522,6 +522,7 @@ HEADER_SRCS = \
@@ -532,6 +532,7 @@ HEADER_SRCS = \
ntddstor.h \
ntdef.h \
ntdsapi.h \
@ -326,5 +326,5 @@ index 00000000000..db07c28a5df
+
+#endif /* __WINE_NTIFS_H */
--
2.11.0
2.13.1

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "0e0834ae92291e9857ed01f3cb116240abda642b"
echo "7e1522cdd69587b59f97a3b3c755cef40a52070e"
}
# Show version information

View File

@ -1,4 +1,4 @@
From bf82e5d2fe5a5436059f46266a2f2d8e754fcdb0 Mon Sep 17 00:00:00 2001
From 8ad8b81d980a4a8ce1d53145e5708963627367e8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 17 Aug 2015 01:11:47 +0200
Subject: server: Store a reference to the parent object for pipe servers. (v2)
@ -11,10 +11,10 @@ Subject: server: Store a reference to the parent object for pipe servers. (v2)
4 files changed, 53 insertions(+), 19 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index b58f76365f..84b783b80a 100644
index 43c5ee46d71..9a1ba670ab7 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -1503,14 +1503,11 @@ static void test_query_object(void)
@@ -1487,14 +1487,11 @@ static void test_query_object(void)
status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len );
ok( status == STATUS_SUCCESS , "NtQueryObject returned %x\n", status );
str = (UNICODE_STRING *)buffer;
@ -30,7 +30,7 @@ index b58f76365f..84b783b80a 100644
"name too short %s\n", wine_dbgstr_w(str->Buffer) );
trace( "got %s len %u\n", wine_dbgstr_w(str->Buffer), len );
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 436fb3c5df..f600703d24 100644
index e154712e7f0..b36a41c679e 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -163,6 +163,8 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue );
@ -40,8 +40,8 @@ index 436fb3c5df..f600703d24 100644
+static int pipe_server_link_name( struct object *obj, struct object_name *name, struct object *parent );
+static void pipe_server_unlink_name( struct object *obj, struct object_name *name );
static void pipe_server_destroy( struct object *obj);
static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async );
static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static int pipe_server_flush( struct fd *fd, struct async *async );
static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
@@ -182,8 +184,8 @@ static const struct object_ops pipe_server_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
@ -60,8 +60,8 @@ index 436fb3c5df..f600703d24 100644
+static int pipe_client_link_name( struct object *obj, struct object_name *name, struct object *parent );
+static void pipe_client_unlink_name( struct object *obj, struct object_name *name );
static void pipe_client_destroy( struct object *obj );
static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async );
static obj_handle_t pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static int pipe_client_flush( struct fd *fd, struct async *async );
static int pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
@@ -226,8 +230,8 @@ static const struct object_ops pipe_client_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
@ -73,7 +73,7 @@ index 436fb3c5df..f600703d24 100644
no_open_file, /* open_file */
no_alloc_handle, /* alloc_handle */
fd_close_handle, /* close_handle */
@@ -479,6 +483,17 @@ static void pipe_end_destroy( struct pipe_end *pipe_end )
@@ -478,6 +482,17 @@ static void pipe_end_destroy( struct pipe_end *pipe_end )
free_async_queue( pipe_end->write_q );
}
@ -91,7 +91,7 @@ index 436fb3c5df..f600703d24 100644
static void pipe_server_destroy( struct object *obj)
{
struct pipe_server *server = (struct pipe_server *)obj;
@@ -508,6 +523,17 @@ static void pipe_server_destroy( struct object *obj)
@@ -507,6 +522,17 @@ static void pipe_server_destroy( struct object *obj)
release_object( server->pipe );
}
@ -109,7 +109,7 @@ index 436fb3c5df..f600703d24 100644
static void pipe_client_destroy( struct object *obj)
{
struct pipe_client *client = (struct pipe_client *)obj;
@@ -1073,9 +1099,10 @@ static void init_pipe_end( struct pipe_end *pipe_end, unsigned int pipe_flags, d
@@ -1037,9 +1063,10 @@ static void init_pipe_end( struct pipe_end *pipe_end, unsigned int pipe_flags, d
static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned int options,
unsigned int pipe_flags )
{
@ -121,7 +121,7 @@ index 436fb3c5df..f600703d24 100644
if (!server)
return NULL;
@@ -1097,11 +1124,13 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned
@@ -1061,11 +1088,13 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned
return server;
}
@ -137,7 +137,7 @@ index 436fb3c5df..f600703d24 100644
if (!client)
return NULL;
@@ -1171,7 +1200,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
@@ -1135,7 +1164,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
return NULL;
}
@ -147,7 +147,7 @@ index 436fb3c5df..f600703d24 100644
if (use_server_io( &server->pipe_end ))
{
diff --git a/server/object.c b/server/object.c
index 2ce1cdcd56..37ac0adce6 100644
index 14cd38e6f7e..77772a8e38b 100644
--- a/server/object.c
+++ b/server/object.c
@@ -176,7 +176,7 @@ WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len )
@ -201,7 +201,7 @@ index 2ce1cdcd56..37ac0adce6 100644
/* dump the name of an object to stderr */
diff --git a/server/object.h b/server/object.h
index 9ff123ebff..4a5d282a47 100644
index 72ad8528c5a..ddb4410525b 100644
--- a/server/object.h
+++ b/server/object.h
@@ -135,6 +135,8 @@ extern WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len );
@ -214,5 +214,5 @@ index 9ff123ebff..4a5d282a47 100644
const struct unicode_str *name, unsigned int attributes,
const struct security_descriptor *sd );
--
2.12.2
2.13.1

View File

@ -1,15 +1,15 @@
From a2c2f2fdd214dcc58263687c930cf70b08d214e5 Mon Sep 17 00:00:00 2001
From ae27ea7329561c939058579f45154e7905042478 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 24 Jan 2017 12:37:46 +0100
Subject: winex11: Fix alpha blending in X11DRV_UpdateLayeredWindow.
Based on a patch by Dmitry Timoshkov.
---
dlls/winex11.drv/window.c | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)
dlls/winex11.drv/window.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index ea4933f00e..7cb55e7061 100644
index eaf6dcfa3ed..5dec74acae7 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -410,14 +410,11 @@ static void sync_window_region( struct x11drv_win_data *data, HRGN win_region )
@ -85,27 +85,27 @@ index ea4933f00e..7cb55e7061 100644
if (surface) window_surface_add_ref( surface );
release_win_data( data );
@@ -2629,14 +2629,12 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
@@ -2629,16 +2629,15 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
{
IntersectRect( &rect, &rect, info->prcDirty );
memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage );
- PatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS );
- }
}
src_rect = rect;
if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y );
DPtoLP( info->hdcSrc, (POINT *)&src_rect, 2 );
- ret = GdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
- info->hdcSrc,
- rect.left + (info->pptSrc ? info->pptSrc->x : 0),
- rect.top + (info->pptSrc ? info->pptSrc->y : 0),
- rect.right - rect.left, rect.bottom - rect.top,
- info->hdcSrc, src_rect.left, src_rect.top,
- src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
- (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend );
+ }
+ ret = BitBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
+ info->hdcSrc,
+ rect.left + (info->pptSrc ? info->pptSrc->x : 0),
+ rect.top + (info->pptSrc ? info->pptSrc->y : 0),
+ SRCCOPY );
+ ret = StretchBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
+ info->hdcSrc, src_rect.left, src_rect.top,
+ src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
+ SRCCOPY );
if (ret)
{
memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage );
--
2.12.2
2.13.1

View File

@ -1,4 +1,4 @@
From 07fe34fdfb46c17db9aeb46c2ce44ba2a7db9698 Mon Sep 17 00:00:00 2001
From b44f5b5594c69442d83e7f35cb2188732de2eabb 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 eebf3e02eb..da82a35740 100644
index e89f1683b68..9b01c2d4324 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -3033,6 +3033,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 eebf3e02eb..da82a35740 100644
if (wsa->flags & TF_DISCONNECT)
{
/* we can't use WS_closesocket because it modifies the last error */
@@ -3075,7 +3086,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 eebf3e02eb..da82a35740 100644
socklen_t 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 57e2dd97d9..d4f967df42 100644
index cb2f652e030..e9337de3661 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -8694,7 +8694,6 @@ static void test_TransmitFile(void)
@@ -8695,7 +8695,6 @@ static void test_TransmitFile(void)
err, WSAENOTSOCK);
/* Test TransmitFile with a UDP datagram socket */
@ -55,7 +55,7 @@ index 57e2dd97d9..d4f967df42 100644
bret = pTransmitFile(client, NULL, 0, 0, NULL, NULL, 0);
err = WSAGetLastError();
diff --git a/include/winsock.h b/include/winsock.h
index cf9adf57eb..2feb22466e 100644
index cf9adf57ebd..2feb22466e4 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -816,6 +816,7 @@ typedef struct WS(WSAData)
@ -67,7 +67,7 @@ index cf9adf57eb..2feb22466e 100644
#define FD_WINE_NONBLOCKING 0x20000000
#define FD_WINE_CONNECTED 0x40000000
diff --git a/server/protocol.def b/server/protocol.def
index 1f88c6a5c8..e192011d46 100644
index 1f88c6a5c86..e192011d465 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1312,6 +1312,12 @@ enum server_fd_type
@ -84,7 +84,7 @@ index 1f88c6a5c8..e192011d46 100644
@REQ(set_socket_event)
obj_handle_t handle; /* handle to the socket */
diff --git a/server/sock.c b/server/sock.c
index 1625ed3a42..076c606f5d 100644
index 083f583e8fa..52c1e28fa66 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -86,6 +86,7 @@
@ -96,7 +96,7 @@ index 1625ed3a42..076c606f5d 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 );
static int 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 );
@ -112,7 +112,7 @@ index 1625ed3a42..076c606f5d 100644
sock_destroy /* destroy */
};
@@ -611,6 +613,47 @@ static struct fd *sock_get_fd( struct object *obj )
@@ -609,6 +611,47 @@ static struct fd *sock_get_fd( struct object *obj )
return (struct fd *)grab_object( sock->fd );
}
@ -160,7 +160,7 @@ index 1625ed3a42..076c606f5d 100644
static void sock_destroy( struct object *obj )
{
struct sock *sock = (struct sock *)obj;
@@ -663,15 +706,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne
@@ -661,15 +704,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne
struct sock *sock;
int sockfd;
@ -177,7 +177,7 @@ index 1625ed3a42..076c606f5d 100644
if (!(sock = alloc_object( &sock_ops )))
{
close( sockfd );
@@ -1240,6 +1276,17 @@ DECL_HANDLER(accept_into_socket)
@@ -1238,6 +1274,17 @@ DECL_HANDLER(accept_into_socket)
release_object( sock );
}