Signed-off-by: Zebediah Figura z.figura12@gmail.com --- include/wine/afd.h | 1 + server/sock.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+)
diff --git a/include/wine/afd.h b/include/wine/afd.h index ad8e3abf5ba..6f0a78ca933 100644 --- a/include/wine/afd.h +++ b/include/wine/afd.h @@ -157,6 +157,7 @@ struct afd_get_events_params #define IOCTL_AFD_WINE_KEEPALIVE_VALS CTL_CODE(FILE_DEVICE_NETWORK, 214, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_AFD_WINE_MESSAGE_SELECT CTL_CODE(FILE_DEVICE_NETWORK, 215, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_AFD_WINE_GETPEERNAME CTL_CODE(FILE_DEVICE_NETWORK, 216, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_AFD_WINE_DEFER CTL_CODE(FILE_DEVICE_NETWORK, 217, METHOD_BUFFERED, FILE_ANY_ACCESS)
struct afd_create_params { diff --git a/server/sock.c b/server/sock.c index bb0d13d9e6c..7b40b6e3f30 100644 --- a/server/sock.c +++ b/server/sock.c @@ -2497,6 +2497,24 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) set_reply_data( &sock->addr, sock->addr_len ); return 1;
+ case IOCTL_AFD_WINE_DEFER: + { + const obj_handle_t *handle = get_req_data(); + struct sock *acceptsock; + + if (get_req_data_size() < sizeof(*handle)) + { + set_error( STATUS_BUFFER_TOO_SMALL ); + return 0; + } + + acceptsock = (struct sock *)get_handle_obj( current->process, *handle, 0, &sock_ops ); + if (!acceptsock) return 0; + + sock->deferred = acceptsock; + return 1; + } + default: set_error( STATUS_NOT_SUPPORTED ); return 0;