server: Store full-sized completion information on the server side.

This commit is contained in:
Dmitry Timoshkov 2013-08-23 19:37:51 +09:00 committed by Alexandre Julliard
parent aa3a43f769
commit 0b4c9cb533
8 changed files with 26 additions and 28 deletions

View file

@ -1001,11 +1001,6 @@ static void test_iocp_setcompletion(HANDLE h)
if (get_msg(h))
{
ok( completionKey == CKEY_FIRST, "Invalid completion key: %lx\n", completionKey );
/* FIXME: Remove once Wine is fixed */
if (sizeof(size) > 4)
todo_wine
ok( ioSb.Information == size, "Invalid ioSb.Information: %lu\n", ioSb.Information );
else
ok( ioSb.Information == size, "Invalid ioSb.Information: %lu\n", ioSb.Information );
ok( U(ioSb).Status == STATUS_INVALID_DEVICE_REQUEST, "Invalid ioSb.Status: %x\n", U(ioSb).Status);
ok( completionValue == CVALUE_FIRST, "Invalid completion value: %lx\n", completionValue );

View file

@ -4786,8 +4786,9 @@ struct add_completion_request
obj_handle_t handle;
apc_param_t ckey;
apc_param_t cvalue;
unsigned int information;
apc_param_t information;
unsigned int status;
char __pad_44[4];
};
struct add_completion_reply
{
@ -4806,8 +4807,9 @@ struct remove_completion_reply
struct reply_header __header;
apc_param_t ckey;
apc_param_t cvalue;
unsigned int information;
apc_param_t information;
unsigned int status;
char __pad_36[4];
};
@ -4846,8 +4848,9 @@ struct add_fd_completion_request
struct request_header __header;
obj_handle_t handle;
apc_param_t cvalue;
apc_param_t information;
unsigned int status;
unsigned int information;
char __pad_36[4];
};
struct add_fd_completion_reply
{
@ -5754,6 +5757,6 @@ union generic_reply
struct set_suspend_context_reply set_suspend_context_reply;
};
#define SERVER_PROTOCOL_VERSION 441
#define SERVER_PROTOCOL_VERSION 442
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View file

@ -241,7 +241,7 @@ void async_set_timeout( struct async *async, timeout_t timeout, unsigned int sta
}
static void add_async_completion( struct async_queue *queue, apc_param_t cvalue, unsigned int status,
unsigned int information )
apc_param_t information )
{
if (status == STATUS_MORE_PROCESSING_REQUIRED)
return; /* The async callback has successfully finished but no completion should be reported */
@ -262,7 +262,7 @@ static void add_async_completion( struct async_queue *queue, apc_param_t cvalue,
}
/* store the result of the client-side async callback */
void async_set_result( struct object *obj, unsigned int status, unsigned int total, client_ptr_t apc )
void async_set_result( struct object *obj, unsigned int status, apc_param_t total, client_ptr_t apc )
{
struct async *async = (struct async *)obj;

View file

@ -82,7 +82,7 @@ struct comp_msg
struct list queue_entry;
apc_param_t ckey;
apc_param_t cvalue;
unsigned int information;
apc_param_t information;
unsigned int status;
};
@ -152,7 +152,7 @@ struct completion *get_completion_obj( struct process *process, obj_handle_t han
}
void add_completion( struct completion *completion, apc_param_t ckey, apc_param_t cvalue,
unsigned int status, unsigned int information )
unsigned int status, apc_param_t information )
{
struct comp_msg *msg = mem_alloc( sizeof( *msg ) );

View file

@ -143,7 +143,7 @@ extern struct dir *get_dir_obj( struct process *process, obj_handle_t handle, un
extern struct completion *get_completion_obj( struct process *process, obj_handle_t handle, unsigned int access );
extern void add_completion( struct completion *completion, apc_param_t ckey, apc_param_t cvalue,
unsigned int status, unsigned int information );
unsigned int status, apc_param_t information );
/* serial port functions */
@ -157,7 +157,7 @@ extern struct async *create_async( struct thread *thread, struct async_queue *qu
const async_data_t *data );
extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status );
extern void async_set_result( struct object *obj, unsigned int status,
unsigned int total, client_ptr_t apc );
apc_param_t total, client_ptr_t apc );
extern int async_queued( struct async_queue *queue );
extern int async_waiting( struct async_queue *queue );
extern void async_terminate( struct async *async, unsigned int status );

View file

@ -3326,7 +3326,7 @@ enum coords_relative
obj_handle_t handle; /* port handle */
apc_param_t ckey; /* completion key */
apc_param_t cvalue; /* completion value */
unsigned int information; /* IO_STATUS_BLOCK Information */
apc_param_t information; /* IO_STATUS_BLOCK Information */
unsigned int status; /* completion result */
@END
@ -3337,7 +3337,7 @@ enum coords_relative
@REPLY
apc_param_t ckey; /* completion key */
apc_param_t cvalue; /* completion value */
unsigned int information; /* IO_STATUS_BLOCK Information */
apc_param_t information; /* IO_STATUS_BLOCK Information */
unsigned int status; /* completion result */
@END
@ -3362,8 +3362,8 @@ enum coords_relative
@REQ(add_fd_completion)
obj_handle_t handle; /* async' object */
apc_param_t cvalue; /* completion value */
apc_param_t information; /* IO_STATUS_BLOCK Information */
unsigned int status; /* completion status */
unsigned int information; /* IO_STATUS_BLOCK Information */
@END

View file

@ -2108,15 +2108,15 @@ C_ASSERT( FIELD_OFFSET(struct add_completion_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct add_completion_request, ckey) == 16 );
C_ASSERT( FIELD_OFFSET(struct add_completion_request, cvalue) == 24 );
C_ASSERT( FIELD_OFFSET(struct add_completion_request, information) == 32 );
C_ASSERT( FIELD_OFFSET(struct add_completion_request, status) == 36 );
C_ASSERT( sizeof(struct add_completion_request) == 40 );
C_ASSERT( FIELD_OFFSET(struct add_completion_request, status) == 40 );
C_ASSERT( sizeof(struct add_completion_request) == 48 );
C_ASSERT( FIELD_OFFSET(struct remove_completion_request, handle) == 12 );
C_ASSERT( sizeof(struct remove_completion_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, ckey) == 8 );
C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, cvalue) == 16 );
C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, information) == 24 );
C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, status) == 28 );
C_ASSERT( sizeof(struct remove_completion_reply) == 32 );
C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, status) == 32 );
C_ASSERT( sizeof(struct remove_completion_reply) == 40 );
C_ASSERT( FIELD_OFFSET(struct query_completion_request, handle) == 12 );
C_ASSERT( sizeof(struct query_completion_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct query_completion_reply, depth) == 8 );
@ -2127,9 +2127,9 @@ C_ASSERT( FIELD_OFFSET(struct set_completion_info_request, chandle) == 24 );
C_ASSERT( sizeof(struct set_completion_info_request) == 32 );
C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, cvalue) == 16 );
C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, status) == 24 );
C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, information) == 28 );
C_ASSERT( sizeof(struct add_fd_completion_request) == 32 );
C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, information) == 24 );
C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, status) == 32 );
C_ASSERT( sizeof(struct add_fd_completion_request) == 40 );
C_ASSERT( FIELD_OFFSET(struct get_window_layered_info_request, handle) == 12 );
C_ASSERT( sizeof(struct get_window_layered_info_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_window_layered_info_reply, color_key) == 8 );

View file

@ -3886,7 +3886,7 @@ static void dump_add_completion_request( const struct add_completion_request *re
fprintf( stderr, " handle=%04x", req->handle );
dump_uint64( ", ckey=", &req->ckey );
dump_uint64( ", cvalue=", &req->cvalue );
fprintf( stderr, ", information=%08x", req->information );
dump_uint64( ", information=", &req->information );
fprintf( stderr, ", status=%08x", req->status );
}
@ -3899,7 +3899,7 @@ static void dump_remove_completion_reply( const struct remove_completion_reply *
{
dump_uint64( " ckey=", &req->ckey );
dump_uint64( ", cvalue=", &req->cvalue );
fprintf( stderr, ", information=%08x", req->information );
dump_uint64( ", information=", &req->information );
fprintf( stderr, ", status=%08x", req->status );
}
@ -3924,8 +3924,8 @@ static void dump_add_fd_completion_request( const struct add_fd_completion_reque
{
fprintf( stderr, " handle=%04x", req->handle );
dump_uint64( ", cvalue=", &req->cvalue );
dump_uint64( ", information=", &req->information );
fprintf( stderr, ", status=%08x", req->status );
fprintf( stderr, ", information=%08x", req->information );
}
static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )