From 12f502c35bd3ad54f19aa8f891b291d8e99af1f4 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sun, 30 Oct 2011 15:44:31 +0000 Subject: [PATCH] [Win32k] - don't hangup on the user while in send message. svn path=/trunk/; revision=54275 --- reactos/subsystems/win32/win32k/ntuser/msgqueue.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c index 43371612243..5eb96376427 100644 --- a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c +++ b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c @@ -663,6 +663,7 @@ co_MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue) PUSER_SENT_MESSAGE SaveMsg, Message; PLIST_ENTRY Entry; PTHREADINFO pti; + BOOL Ret; LRESULT Result = 0; if (IsListEmpty(&MessageQueue->SentMessagesListHead)) @@ -732,7 +733,8 @@ co_MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue) RemoveEntryList(&Message->ListEntry); InsertTailList(&Message->CallBackSenderQueue->SentMessagesListHead, &Message->ListEntry); TRACE("Callback Message not processed yet. Requeuing the message\n"); - return (FALSE); + Ret = FALSE; + goto Exit; } } else @@ -760,7 +762,8 @@ co_MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue) MsqWakeQueue(Message->CallBackSenderQueue, QS_SENDMESSAGE, TRUE); IntDereferenceMessageQueue(Message->CallBackSenderQueue); } - return (TRUE); + Ret = TRUE; + goto Exit; } /* remove the message from the dispatching list if needed, so lock the sender's message queue */ @@ -808,12 +811,13 @@ co_MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue) /* free the message */ ExFreePoolWithTag(Message, TAG_USRMSG); - + Ret = TRUE; +Exit: /* do not hangup on the user if this is reentering */ if (!SaveMsg) pti->pcti->CTI_flags &= ~CTI_INSENDMESSAGE; pti->pusmCurrent = SaveMsg; - return(TRUE); + return Ret; } VOID APIENTRY