[2/2] server: Clear the queue's QS_SMRESULT bit when sending a new message.
Vincent Povirk
madewokherd at gmail.com
Wed May 14 15:03:46 CDT 2014
This keeps the QS_SMRESULT bit in sync with the reply status of the
most recent sent message, if it happens that the
previously-most-recent sent message already has a reply.
wait_message_reply depends on this to work correctly.
-------------- next part --------------
From 79eea264aec4e47065ebf7d72b4e4517927527d0 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 13 May 2014 15:35:20 -0500
Subject: [PATCH 2/2] server: Clear the queue's QS_SMRESULT bit when sending a
new message.
---
dlls/user32/tests/win.c | 2 +-
server/queue.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 4331dba..e330272 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -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. */
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;
}
diff --git a/server/queue.c b/server/queue.c
index 1954886..3835298 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -681,7 +681,11 @@ static struct message_result *alloc_message_result( struct msg_queue *send_queue
result->callback_msg = callback_msg;
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)
result->timeout = add_timeout_user( timeout, result_timeout, result );
--
1.8.3.2
More information about the wine-patches
mailing list