server: Set QS_SMRESULT when popping a send result if appropriate.

Vincent Povirk madewokherd at gmail.com
Mon May 19 14:03:06 CDT 2014


Currently, the get_message_reply handler assumes that it will only be
called when QS_SMRESULT is already set, and only clears it if the
queue no longer has a topmost result with a reply. Best I can tell,
this will always be true given how user32 currently works, and my
other QS_SMRESULT-related patch doesn't change this.

However, the interface to the server theoretically allows user32 to
remove the topmost send_result without waiting for a reply. If some
future version of user32 did this, and the next message did have a
reply, the server would not set QS_SMRESULT when it should.

Also, the code is arguably a little bit clearer without that assumption.
-------------- next part --------------
From 7cb5887c794c602806d77660bfce54f0c2f39acb Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Mon, 19 May 2014 13:35:48 -0500
Subject: [PATCH] server: Set QS_SMRESULT when popping a send result if
 appropriate.

---
 server/queue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/queue.c b/server/queue.c
index 3835298..57603e1 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -2506,7 +2506,8 @@ DECL_HANDLER(get_message_reply)
             else
             {
                 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 );
             }
         }
     }
-- 
1.8.3.2



More information about the wine-patches mailing list