Module: wine Branch: master Commit: 0157f7688813e9f4d04855f97c3053e104a31ed0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0157f7688813e9f4d04855f97c...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Mar 11 22:44:51 2015 +0900
server: Allow device manager ioctls to run asynchronously.
---
server/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/device.c b/server/device.c index df65aa9..c5e3107 100644 --- a/server/device.c +++ b/server/device.c @@ -313,7 +313,7 @@ static obj_handle_t device_ioctl( struct fd *fd, ioctl_code_t code, const async_ { struct device *device = get_fd_user( fd ); struct ioctl_call *ioctl; - obj_handle_t handle; + obj_handle_t handle = 0;
if (!device->manager) /* it has been deleted */ { @@ -327,7 +327,7 @@ static obj_handle_t device_ioctl( struct fd *fd, ioctl_code_t code, const async_ ioctl->thread = (struct thread *)grab_object( current ); ioctl->user_arg = async_data->arg;
- if (!(handle = alloc_handle( current->process, ioctl, SYNCHRONIZE, 0 ))) + if (blocking && !(handle = alloc_handle( current->process, ioctl, SYNCHRONIZE, 0 ))) { release_object( ioctl ); return 0; @@ -335,7 +335,7 @@ static obj_handle_t device_ioctl( struct fd *fd, ioctl_code_t code, const async_
if (!(ioctl->async = fd_queue_async( device->fd, async_data, ASYNC_TYPE_WAIT ))) { - close_handle( current->process, handle ); + if (handle) close_handle( current->process, handle ); release_object( ioctl ); return 0; }