Removed the message also from the senders queue (in MsqCleanupMessageQueue).

svn path=/trunk/; revision=16634
This commit is contained in:
Hartmut Birr 2005-07-18 15:05:58 +00:00
parent b9edb4f6e3
commit 269fab698e

View file

@ -1423,6 +1423,13 @@ MsqCleanupMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
CurrentSentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE, CurrentSentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE,
ListEntry); 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"); DPRINT("Notify the sender, the thread has been terminated while dispatching a message!\n");
/* wake the sender's thread */ /* wake the sender's thread */
@ -1430,7 +1437,8 @@ MsqCleanupMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
{ {
KeSetEvent(CurrentSentMessage->CompletionEvent, IO_NO_INCREMENT, FALSE); KeSetEvent(CurrentSentMessage->CompletionEvent, IO_NO_INCREMENT, FALSE);
} }
IntUnLockMessageQueue(CurrentSentMessage->SenderQueue);
/* dereference our and the sender's message queue */ /* dereference our and the sender's message queue */
IntDereferenceMessageQueue(MessageQueue); IntDereferenceMessageQueue(MessageQueue);
IntDereferenceMessageQueue(CurrentSentMessage->SenderQueue); IntDereferenceMessageQueue(CurrentSentMessage->SenderQueue);