[ros-diffs] [hbirr] 16634: Removed the message also from the senders queue (in MsqCleanupMessageQueue).

hbirr at svn.reactos.com hbirr at svn.reactos.com
Mon Jul 18 17:06:00 CEST 2005


Removed the message also from the senders queue (in
MsqCleanupMessageQueue).
Modified: trunk/reactos/subsys/win32k/ntuser/msgqueue.c
  _____  

Modified: trunk/reactos/subsys/win32k/ntuser/msgqueue.c
--- trunk/reactos/subsys/win32k/ntuser/msgqueue.c	2005-07-18
14:10:56 UTC (rev 16633)
+++ trunk/reactos/subsys/win32k/ntuser/msgqueue.c	2005-07-18
15:05:58 UTC (rev 16634)
@@ -1423,6 +1423,13 @@

       CurrentSentMessage = CONTAINING_RECORD(CurrentEntry,
USER_SENT_MESSAGE,
                                              ListEntry);
 
+      IntLockMessageQueue(CurrentSentMessage->SenderQueue);
+      /* remove the message from the dispatching list */
+      if(CurrentSentMessage->DispatchingListEntry.Flink != NULL)
+      {
+        RemoveEntryList(&CurrentSentMessage->DispatchingListEntry);
+      }
+
       DPRINT("Notify the sender, the thread has been terminated while
dispatching a message!\n");
 
       /* wake the sender's thread */
@@ -1430,7 +1437,8 @@
       {
         KeSetEvent(CurrentSentMessage->CompletionEvent,
IO_NO_INCREMENT, FALSE);
       }
-
+      IntUnLockMessageQueue(CurrentSentMessage->SenderQueue);
+      
       /* dereference our and the sender's message queue */
       IntDereferenceMessageQueue(MessageQueue);
       IntDereferenceMessageQueue(CurrentSentMessage->SenderQueue);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050718/129e58cd/attachment.html


More information about the Ros-diffs mailing list