mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
server: Don't change iosb without associated async in wake_message.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4f547e784a
commit
bb9c4198fc
1 changed files with 5 additions and 6 deletions
|
@ -356,13 +356,12 @@ static void wake_message( struct pipe_message *message )
|
|||
struct async *async = message->async;
|
||||
|
||||
message->async = NULL;
|
||||
if (!async) return;
|
||||
|
||||
message->iosb->status = STATUS_SUCCESS;
|
||||
message->iosb->result = message->iosb->in_size;
|
||||
if (async)
|
||||
{
|
||||
async_terminate( async, message->iosb->result ? STATUS_ALERTED : STATUS_SUCCESS );
|
||||
release_object( async );
|
||||
}
|
||||
async_terminate( async, message->iosb->result ? STATUS_ALERTED : STATUS_SUCCESS );
|
||||
release_object( async );
|
||||
}
|
||||
|
||||
static void free_message( struct pipe_message *message )
|
||||
|
@ -768,7 +767,7 @@ static void reselect_write_queue( struct pipe_end *pipe_end )
|
|||
else
|
||||
{
|
||||
avail += message->iosb->in_size - message->read_pos;
|
||||
if (message->iosb->status == STATUS_PENDING && (avail <= reader->buffer_size || !message->iosb->in_size))
|
||||
if (message->async && (avail <= reader->buffer_size || !message->iosb->in_size))
|
||||
wake_message( message );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue