Fixed bug that could cause SendMessage to return too early in certain
cases.
This commit is contained in:
parent
6da4c275ca
commit
b1095da50c
|
@ -1026,6 +1026,7 @@ static void reply_message( struct received_message_info *info, LRESULT result, B
|
||||||
|
|
||||||
SERVER_START_REQ( reply_message )
|
SERVER_START_REQ( reply_message )
|
||||||
{
|
{
|
||||||
|
req->type = info->type;
|
||||||
req->result = result;
|
req->result = result;
|
||||||
req->remove = remove;
|
req->remove = remove;
|
||||||
for (i = 0; i < data.count; i++) wine_server_add_data( req, data.data[i], data.size[i] );
|
for (i = 0; i < data.count; i++) wine_server_add_data( req, data.data[i], data.size[i] );
|
||||||
|
@ -1407,6 +1408,7 @@ static BOOL process_hardware_message( MSG *msg, ULONG_PTR extra_info, HWND hwnd,
|
||||||
*/
|
*/
|
||||||
SERVER_START_REQ( reply_message )
|
SERVER_START_REQ( reply_message )
|
||||||
{
|
{
|
||||||
|
req->type = MSG_HARDWARE;
|
||||||
req->result = 0;
|
req->result = 0;
|
||||||
req->remove = remove || !ret;
|
req->remove = remove || !ret;
|
||||||
wine_server_call( req );
|
wine_server_call( req );
|
||||||
|
|
|
@ -2237,6 +2237,7 @@ struct get_message_reply
|
||||||
struct reply_message_request
|
struct reply_message_request
|
||||||
{
|
{
|
||||||
struct request_header __header;
|
struct request_header __header;
|
||||||
|
int type;
|
||||||
unsigned int result;
|
unsigned int result;
|
||||||
int remove;
|
int remove;
|
||||||
/* VARARG(data,bytes); */
|
/* VARARG(data,bytes); */
|
||||||
|
@ -3555,6 +3556,6 @@ union generic_reply
|
||||||
struct get_next_hook_reply get_next_hook_reply;
|
struct get_next_hook_reply get_next_hook_reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 100
|
#define SERVER_PROTOCOL_VERSION 101
|
||||||
|
|
||||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||||
|
|
|
@ -1589,6 +1589,7 @@ enum message_type
|
||||||
|
|
||||||
/* Reply to a sent message */
|
/* Reply to a sent message */
|
||||||
@REQ(reply_message)
|
@REQ(reply_message)
|
||||||
|
int type; /* type of original message */
|
||||||
unsigned int result; /* message result */
|
unsigned int result; /* message result */
|
||||||
int remove; /* should we remove the message? */
|
int remove; /* should we remove the message? */
|
||||||
VARARG(data,bytes); /* message data for sent messages */
|
VARARG(data,bytes); /* message data for sent messages */
|
||||||
|
|
|
@ -1380,15 +1380,15 @@ DECL_HANDLER(reply_message)
|
||||||
set_error( STATUS_ACCESS_DENIED );
|
set_error( STATUS_ACCESS_DENIED );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (current->queue->recv_result)
|
if (req->type == MSG_HARDWARE)
|
||||||
reply_message( current->queue, req->result, 0, req->remove,
|
|
||||||
get_req_data(), get_req_data_size() );
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
struct thread_input *input = current->queue->input;
|
struct thread_input *input = current->queue->input;
|
||||||
if (input->msg_thread == current) release_hardware_message( current, req->remove );
|
if (input->msg_thread == current) release_hardware_message( current, req->remove );
|
||||||
else set_error( STATUS_ACCESS_DENIED );
|
else set_error( STATUS_ACCESS_DENIED );
|
||||||
}
|
}
|
||||||
|
else if (current->queue->recv_result)
|
||||||
|
reply_message( current->queue, req->result, 0, req->remove,
|
||||||
|
get_req_data(), get_req_data_size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1835,6 +1835,7 @@ static void dump_get_message_reply( const struct get_message_reply *req )
|
||||||
|
|
||||||
static void dump_reply_message_request( const struct reply_message_request *req )
|
static void dump_reply_message_request( const struct reply_message_request *req )
|
||||||
{
|
{
|
||||||
|
fprintf( stderr, " type=%d,", req->type );
|
||||||
fprintf( stderr, " result=%08x,", req->result );
|
fprintf( stderr, " result=%08x,", req->result );
|
||||||
fprintf( stderr, " remove=%d,", req->remove );
|
fprintf( stderr, " remove=%d,", req->remove );
|
||||||
fprintf( stderr, " data=" );
|
fprintf( stderr, " data=" );
|
||||||
|
|
Loading…
Reference in New Issue