Signed-off-by: Zebediah Figura z.figura12@gmail.com --- include/wine/afd.h | 4 ++-- server/sock.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/include/wine/afd.h b/include/wine/afd.h index 8199e0e2dbe..5074c1f20dd 100644 --- a/include/wine/afd.h +++ b/include/wine/afd.h @@ -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 { diff --git a/server/sock.c b/server/sock.c index e521818dc4b..45390127acc 100644 --- a/server/sock.c +++ b/server/sock.c @@ -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;