[ros-diffs] [hbirr] 16669: Merge r16633:16634 from trunk. This fix
prevents from corrupting the message queues.
hbirr at svn.reactos.com
hbirr at svn.reactos.com
Wed Jul 20 19:31:30 CEST 2005
Merge r16633:16634 from trunk. This fix prevents from corrupting the
message queues.
Modified:
branches/ros-branch-0_2_7/reactos/subsys/win32k/ntuser/msgqueue.c
_____
Modified:
branches/ros-branch-0_2_7/reactos/subsys/win32k/ntuser/msgqueue.c
--- branches/ros-branch-0_2_7/reactos/subsys/win32k/ntuser/msgqueue.c
2005-07-20 17:06:53 UTC (rev 16668)
+++ branches/ros-branch-0_2_7/reactos/subsys/win32k/ntuser/msgqueue.c
2005-07-20 17:31:18 UTC (rev 16669)
@@ -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/20050720/40506bff/attachment.html
More information about the Ros-diffs
mailing list