server: Return client thread object pointer from get_next_device_request if available.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d9d55bb1d0
commit
2ee040382f
|
@ -981,6 +981,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
|
|||
client_tid = reply->client_tid;
|
||||
in_size = reply->in_size;
|
||||
out_size = reply->out_size;
|
||||
NtCurrentTeb()->Reserved5[1] = wine_server_get_ptr( reply->client_thread );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -5240,12 +5240,11 @@ struct get_next_device_request_reply
|
|||
struct reply_header __header;
|
||||
irp_params_t params;
|
||||
obj_handle_t next;
|
||||
process_id_t client_pid;
|
||||
thread_id_t client_tid;
|
||||
client_ptr_t client_thread;
|
||||
data_size_t in_size;
|
||||
data_size_t out_size;
|
||||
/* VARARG(next_data,bytes); */
|
||||
char __pad_52[4];
|
||||
};
|
||||
|
||||
|
||||
|
@ -6647,6 +6646,6 @@ union generic_reply
|
|||
struct terminate_job_reply terminate_job_reply;
|
||||
};
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 577
|
||||
#define SERVER_PROTOCOL_VERSION 578
|
||||
|
||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||
|
|
|
@ -866,8 +866,8 @@ DECL_HANDLER(get_next_device_request)
|
|||
irp = LIST_ENTRY( ptr, struct irp_call, mgr_entry );
|
||||
if (irp->thread)
|
||||
{
|
||||
reply->client_pid = get_process_id( irp->thread->process );
|
||||
reply->client_tid = get_thread_id( irp->thread );
|
||||
reply->client_thread = get_kernel_object_ptr( manager, &irp->thread->obj );
|
||||
reply->client_tid = get_thread_id( irp->thread );
|
||||
}
|
||||
reply->params = irp->params;
|
||||
iosb = irp->iosb;
|
||||
|
|
|
@ -3618,8 +3618,8 @@ struct handle_info
|
|||
@REPLY
|
||||
irp_params_t params; /* irp parameters */
|
||||
obj_handle_t next; /* handle to the next irp */
|
||||
process_id_t client_pid; /* pid of process calling irp */
|
||||
thread_id_t client_tid; /* tid of thread calling irp */
|
||||
client_ptr_t client_thread; /* pointer to thread object of calling irp */
|
||||
data_size_t in_size; /* total needed input size */
|
||||
data_size_t out_size; /* needed output size */
|
||||
VARARG(next_data,bytes); /* input data of the next irp */
|
||||
|
|
|
@ -2287,10 +2287,10 @@ C_ASSERT( FIELD_OFFSET(struct get_next_device_request_request, status) == 20 );
|
|||
C_ASSERT( sizeof(struct get_next_device_request_request) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, params) == 8 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, next) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, client_pid) == 36 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, client_tid) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, in_size) == 44 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, out_size) == 48 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, client_tid) == 36 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, client_thread) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, in_size) == 48 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_next_device_request_reply, out_size) == 52 );
|
||||
C_ASSERT( sizeof(struct get_next_device_request_reply) == 56 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_kernel_object_ptr_request, manager) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_kernel_object_ptr_request, handle) == 16 );
|
||||
|
|
|
@ -4285,8 +4285,8 @@ static void dump_get_next_device_request_reply( const struct get_next_device_req
|
|||
{
|
||||
dump_irp_params( " params=", &req->params );
|
||||
fprintf( stderr, ", next=%04x", req->next );
|
||||
fprintf( stderr, ", client_pid=%04x", req->client_pid );
|
||||
fprintf( stderr, ", client_tid=%04x", req->client_tid );
|
||||
dump_uint64( ", client_thread=", &req->client_thread );
|
||||
fprintf( stderr, ", in_size=%u", req->in_size );
|
||||
fprintf( stderr, ", out_size=%u", req->out_size );
|
||||
dump_varargs_bytes( ", next_data=", cur_size );
|
||||
|
|
Loading…
Reference in New Issue