Author: jimtabor
Date: Sat Nov 29 08:26:54 2014
New Revision: 65522
URL:
http://svn.reactos.org/svn/reactos?rev=65522&view=rev
Log:
[NtUser]
- Fix timeout for send messages.
- Assert if not the same thread while dispatching messages.
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] Sat Nov 29 08:26:54 2014
@@ -2,7 +2,7 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Win32k subsystem
* PURPOSE: Message queues
- * FILE: subsystems/win32/win32k/ntuser/msgqueue.c
+ * FILE: win32ss/user/ntuser/msgqueue.c
* PROGRAMER: Casper S. Hornstrup (chorns(a)users.sourceforge.net)
Alexandre Julliard
Maarten Lankhorst
@@ -751,6 +751,8 @@
BOOL Ret;
LRESULT Result = 0;
+ ASSERT(pti == PsGetCurrentThreadWin32Thread());
+
if (IsListEmpty(&pti->SentMessagesListHead))
{
return(FALSE);
@@ -1098,7 +1100,8 @@
KeInitializeEvent(&CompletionEvent, NotificationEvent, FALSE);
- Timeout.QuadPart = (LONGLONG) uTimeout * (LONGLONG) -10000;
+ Timeout.QuadPart = Int32x32To64(-10000,uTimeout); // Pass SMTO test with a TO of
0x80000000.
+ TRACE("Timeout val %lld\n",Timeout.QuadPart)
/* FIXME: Increase reference counter of sender's message queue here */
@@ -1181,7 +1184,7 @@
TRACE("MsqSendMessage (blocked) timed out 1\n");
}
- while (co_MsqDispatchOneSentMessage(ptirec))
+ while (co_MsqDispatchOneSentMessage(pti))
;
}
else