- Fix wine msg:test_SendMessageTimeout. Do not allow the message to pass on after a timeout.

svn path=/trunk/; revision=66245
This commit is contained in:
James Tabor 2015-02-13 13:45:11 +00:00
parent 89e2d8aeb8
commit fee28b842e

View file

@ -1172,7 +1172,7 @@ co_MsqSendMessage(PTHREADINFO ptirec,
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 @@ co_MsqSendMessage(PTHREADINFO ptirec,
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 @@ co_MsqSendMessage(PTHREADINFO ptirec,
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 @@ co_MsqSendMessage(PTHREADINFO ptirec,
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 @@ co_MsqSendMessage(PTHREADINFO ptirec,
Entry = Entry->Flink;
}
}
if (WaitStatus == STATUS_USER_APC) break;
while (co_MsqDispatchOneSentMessage(pti))
;
}