Commit ea038894 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Introduce IOCTL_AFD_ACCEPT_INTO.

parent cb1594cf
......@@ -25,6 +25,7 @@
#define IOCTL_AFD_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ACCEPT CTL_CODE(FILE_DEVICE_NETWORK, 201, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ACCEPT_INTO CTL_CODE(FILE_DEVICE_NETWORK, 202, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 323, METHOD_BUFFERED, 0)
......
......@@ -1108,6 +1108,27 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 0;
}
case IOCTL_AFD_ACCEPT_INTO:
{
static const int access = FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES | FILE_READ_DATA;
struct sock *acceptsock;
obj_handle_t handle;
if (get_req_data_size() != sizeof(handle))
{
set_error( STATUS_BUFFER_TOO_SMALL );
return 0;
}
handle = *(obj_handle_t *)get_req_data();
if (!(acceptsock = (struct sock *)get_handle_obj( current->process, handle, access, &sock_ops )))
return 0;
if (accept_into_socket( sock, acceptsock ))
acceptsock->wparam = handle;
release_object( acceptsock );
return 0;
}
case IOCTL_AFD_ADDRESS_LIST_CHANGE:
if ((sock->state & FD_WINE_NONBLOCKING) && async_is_blocking( async ))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment