server: Introduce IOCTL_AFD_WINE_FIONBIO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
759ecd6e59
commit
bd2e5ff939
|
@ -95,8 +95,8 @@ struct afd_poll_params
|
|||
#define IOCTL_AFD_WINE_RECVMSG CTL_CODE(FILE_DEVICE_NETWORK, 205, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_SENDMSG CTL_CODE(FILE_DEVICE_NETWORK, 206, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_TRANSMIT CTL_CODE(FILE_DEVICE_NETWORK, 207, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 323, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 208, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_FIONBIO CTL_CODE(FILE_DEVICE_NETWORK, 209, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
struct afd_create_params
|
||||
{
|
||||
|
|
|
@ -1892,6 +1892,27 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
|
|||
set_error( STATUS_PENDING );
|
||||
return 1;
|
||||
|
||||
case IOCTL_AFD_WINE_FIONBIO:
|
||||
if (get_req_data_size() < sizeof(int))
|
||||
{
|
||||
set_error( STATUS_BUFFER_TOO_SMALL );
|
||||
return 0;
|
||||
}
|
||||
if (*(int *)get_req_data())
|
||||
{
|
||||
sock->state |= FD_WINE_NONBLOCKING;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sock->mask)
|
||||
{
|
||||
set_error( STATUS_INVALID_PARAMETER );
|
||||
return 0;
|
||||
}
|
||||
sock->state &= ~FD_WINE_NONBLOCKING;
|
||||
}
|
||||
return 1;
|
||||
|
||||
default:
|
||||
set_error( STATUS_NOT_SUPPORTED );
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue