Alexandre Julliard : server: Use attributes instead of inherit flag
in dup_handle request.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Dec 9 05:54:22 CST 2005
Module: wine
Branch: refs/heads/master
Commit: 7b910f40f266476514cbafd4c43199c8651cdb18
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=7b910f40f266476514cbafd4c43199c8651cdb18
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Dec 9 12:21:35 2005 +0100
server: Use attributes instead of inherit flag in dup_handle request.
---
dlls/ntdll/om.c | 2 +-
include/wine/server_protocol.h | 6 +++---
server/handle.c | 4 ++--
server/protocol.def | 4 ++--
server/trace.c | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index 8a358eb..c46845a 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -306,7 +306,7 @@ NTSTATUS WINAPI NtDuplicateObject( HANDL
req->src_handle = source;
req->dst_process = dest_process;
req->access = access;
- req->inherit = (attributes & OBJ_INHERIT) != 0;
+ req->attributes = attributes;
req->options = options;
if (!(ret = wine_server_call( req )))
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 65a5be8..f494e54 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -547,8 +547,8 @@ struct dup_handle_request
obj_handle_t src_handle;
obj_handle_t dst_process;
unsigned int access;
- int inherit;
- int options;
+ unsigned int attributes;
+ unsigned int options;
};
struct dup_handle_reply
{
@@ -4321,6 +4321,6 @@ union generic_reply
struct query_symlink_reply query_symlink_reply;
};
-#define SERVER_PROTOCOL_VERSION 213
+#define SERVER_PROTOCOL_VERSION 214
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/handle.c b/server/handle.c
index 176249e..9ba56b6 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -573,12 +573,12 @@ DECL_HANDLER(dup_handle)
if (req->options & DUP_HANDLE_MAKE_GLOBAL)
{
reply->handle = duplicate_handle( src, req->src_handle, NULL,
- req->access, req->inherit, req->options );
+ req->access, req->attributes & OBJ_INHERIT, req->options );
}
else if ((dst = get_process_from_handle( req->dst_process, PROCESS_DUP_HANDLE )))
{
reply->handle = duplicate_handle( src, req->src_handle, dst,
- req->access, req->inherit, req->options );
+ req->access, req->attributes & OBJ_INHERIT, req->options );
release_object( dst );
}
/* close the handle no matter what happened */
diff --git a/server/protocol.def b/server/protocol.def
index 70b587a..3fd4ff0 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -450,8 +450,8 @@ enum apc_type { APC_NONE, APC_USER, APC_
obj_handle_t src_handle; /* src handle to duplicate */
obj_handle_t dst_process; /* dst process handle */
unsigned int access; /* wanted access rights */
- int inherit; /* inherit flag */
- int options; /* duplicate options (see below) */
+ unsigned int attributes; /* object attributes */
+ unsigned int options; /* duplicate options (see below) */
@REPLY
obj_handle_t handle; /* duplicated handle in dst process */
int fd; /* associated fd to close */
diff --git a/server/trace.c b/server/trace.c
index aff977f..e0947e2 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -846,8 +846,8 @@ static void dump_dup_handle_request( con
fprintf( stderr, " src_handle=%p,", req->src_handle );
fprintf( stderr, " dst_process=%p,", req->dst_process );
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
- fprintf( stderr, " options=%d", req->options );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
+ fprintf( stderr, " options=%08x", req->options );
}
static void dump_dup_handle_reply( const struct dup_handle_reply *req )
More information about the wine-cvs
mailing list