server: Allow caching device file handles.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-10-24 17:48:56 +02:00 committed by Alexandre Julliard
parent 3b30002aec
commit 5b2dc08307
2 changed files with 3 additions and 1 deletions

View File

@ -383,6 +383,8 @@ static struct object *device_open_file( struct object *obj, unsigned int access,
return NULL;
}
allow_fd_caching( file->fd );
if (device->manager)
{
struct irp_call *irp;

View File

@ -2441,10 +2441,10 @@ DECL_HANDLER(get_handle_fd)
if ((fd = get_handle_fd_obj( current->process, req->handle, 0 )))
{
int unix_fd = get_unix_fd( fd );
reply->cacheable = fd->cacheable;
if (unix_fd != -1)
{
reply->type = fd->fd_ops->get_fd_type( fd );
reply->cacheable = fd->cacheable;
reply->options = fd->options;
reply->access = get_handle_access( current->process, req->handle );
send_client_fd( current->process, unix_fd, req->handle );