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

server: Clear FD_OOB instead of FD_READ when receiving OOB data.

parent b5e264a4
......@@ -223,6 +223,7 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
req->status = status;
req->total = information;
req->async = server_async( handle, &async->io, event, apc, apc_user, io );
req->oob = !!(unix_flags & MSG_OOB);
status = wine_server_call( req );
wait_handle = wine_server_ptr_handle( reply->wait );
options = reply->options;
......
......@@ -1808,7 +1808,7 @@ struct set_socket_deferred_reply
struct recv_socket_request
{
struct request_header __header;
char __pad_12[4];
int oob;
async_data_t async;
unsigned int status;
unsigned int total;
......@@ -6287,7 +6287,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 706
#define SERVER_PROTOCOL_VERSION 707
/* ### protocol_version end ### */
......
......@@ -1468,6 +1468,7 @@ enum server_fd_type
/* Perform a recv on a socket */
@REQ(recv_socket)
int oob; /* are we receiving OOB data? */
async_data_t async; /* async I/O parameters */
unsigned int status; /* status of initial call */
unsigned int total; /* number of bytes already read */
......
......@@ -1068,6 +1068,7 @@ C_ASSERT( sizeof(struct enable_socket_event_request) == 32 );
C_ASSERT( FIELD_OFFSET(struct set_socket_deferred_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct set_socket_deferred_request, deferred) == 16 );
C_ASSERT( sizeof(struct set_socket_deferred_request) == 24 );
C_ASSERT( FIELD_OFFSET(struct recv_socket_request, oob) == 12 );
C_ASSERT( FIELD_OFFSET(struct recv_socket_request, async) == 16 );
C_ASSERT( FIELD_OFFSET(struct recv_socket_request, status) == 56 );
C_ASSERT( FIELD_OFFSET(struct recv_socket_request, total) == 60 );
......
......@@ -2452,8 +2452,8 @@ DECL_HANDLER(recv_socket)
/* are we shut down? */
if (status == STATUS_PENDING && !(sock->state & FD_READ)) status = STATUS_PIPE_DISCONNECTED;
sock->pending_events &= ~FD_READ;
sock->reported_events &= ~FD_READ;
sock->pending_events &= ~(req->oob ? FD_OOB : FD_READ);
sock->reported_events &= ~(req->oob ? FD_OOB : FD_READ);
if ((async = create_request_async( fd, get_fd_comp_flags( fd ), &req->async )))
{
......
......@@ -2124,7 +2124,8 @@ static void dump_set_socket_deferred_request( const struct set_socket_deferred_r
static void dump_recv_socket_request( const struct recv_socket_request *req )
{
dump_async_data( " async=", &req->async );
fprintf( stderr, " oob=%d", req->oob );
dump_async_data( ", async=", &req->async );
fprintf( stderr, ", status=%08x", req->status );
fprintf( stderr, ", total=%08x", req->total );
}
......
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