server: Introduce IOCTL_AFD_ACCEPT_INTO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cb1594cf4f
commit
ea038894a6
|
@ -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 ))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue