Author: jimtabor
Date: Fri Feb 13 13:45:11 2015
New Revision: 66245
URL:
http://svn.reactos.org/svn/reactos?rev=66245&view=rev
Log:
[NtUser]
- Fix wine msg:test_SendMessageTimeout. Do not allow the message to pass on after a
timeout.
Modified:
trunk/reactos/win32ss/user/ntuser/msgqueue.c
Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Fri Feb 13 13:45:11 2015
@@ -1172,7 +1172,7 @@
UserEnterCo();
- if (WaitStatus == STATUS_TIMEOUT || WaitStatus == STATUS_USER_APC)
+ if (WaitStatus == STATUS_TIMEOUT)
{
/* Look up if the message has not yet dispatched, if so
make sure it can't pass a result and it must not set the completion event
anymore */
@@ -1186,6 +1186,9 @@
and the message is still hasn't been dispatched */
Message->CompletionEvent = NULL;
Message->Result = NULL;
+ RemoveEntryList(&Message->ListEntry);
+ ClearMsgBitsMask(ptirec, Message->QS_Flags);
+ ExFreePoolWithTag(Message, TAG_USRMSG);
break;
}
Entry = Entry->Flink;
@@ -1254,7 +1257,7 @@
UserEnterCo();
- if (WaitStatus == STATUS_TIMEOUT || WaitStatus == STATUS_USER_APC)
+ if (WaitStatus == STATUS_TIMEOUT)
{
/* Look up if the message has not yet been dispatched, if so
make sure it can't pass a result and it must not set the completion
event anymore */
@@ -1268,6 +1271,9 @@
and the message is still hasn't been dispatched */
Message->CompletionEvent = NULL;
Message->Result = NULL;
+ RemoveEntryList(&Message->ListEntry);
+ ClearMsgBitsMask(ptirec, Message->QS_Flags);
+ ExFreePoolWithTag(Message, TAG_USRMSG);
break;
}
Entry = Entry->Flink;
@@ -1317,6 +1323,9 @@
Entry = Entry->Flink;
}
}
+
+ if (WaitStatus == STATUS_USER_APC) break;
+
while (co_MsqDispatchOneSentMessage(pti))
;
}