server: Clear the queue's QS_SMRESULT bit when sending a new message.

This commit is contained in:
Vincent Povirk 2014-05-13 15:35:20 -05:00 committed by Alexandre Julliard
parent 2c984fc8e2
commit 417585661c
2 changed files with 8 additions and 3 deletions

View File

@ -7580,7 +7580,7 @@ static LRESULT WINAPI smresult_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
/* Send another message while we have a reply queued for the current one. */ /* Send another message while we have a reply queued for the current one. */
res = SendMessageA(data->thread_hwnd, WM_APP+2, 0, lparam); res = SendMessageA(data->thread_hwnd, WM_APP+2, 0, lparam);
todo_wine ok(res == 0x449b0190, "unexpected result %lx\n", res); ok(res == 0x449b0190, "unexpected result %lx\n", res);
return 0; return 0;
} }

View File

@ -681,7 +681,11 @@ static struct message_result *alloc_message_result( struct msg_queue *send_queue
result->callback_msg = callback_msg; result->callback_msg = callback_msg;
list_add_head( &send_queue->callback_result, &result->sender_entry ); list_add_head( &send_queue->callback_result, &result->sender_entry );
} }
else if (send_queue) list_add_head( &send_queue->send_result, &result->sender_entry ); else if (send_queue)
{
list_add_head( &send_queue->send_result, &result->sender_entry );
clear_queue_bits( send_queue, QS_SMRESULT );
}
if (timeout != TIMEOUT_INFINITE) if (timeout != TIMEOUT_INFINITE)
result->timeout = add_timeout_user( timeout, result_timeout, result ); result->timeout = add_timeout_user( timeout, result_timeout, result );
@ -2502,7 +2506,8 @@ DECL_HANDLER(get_message_reply)
else else
{ {
result = LIST_ENTRY( entry, struct message_result, sender_entry ); result = LIST_ENTRY( entry, struct message_result, sender_entry );
if (!result->replied) clear_queue_bits( queue, QS_SMRESULT ); if (result->replied) set_queue_bits( queue, QS_SMRESULT );
else clear_queue_bits( queue, QS_SMRESULT );
} }
} }
} }