Author: ion
Date: Sun Feb 19 07:22:37 2012
New Revision: 55700
URL:
http://svn.reactos.org/svn/reactos?rev=55700&view=rev
Log:
[CSRSRV]: Fix scenario when a new thread is being created from within CSRSRV and it could
not register itself due to the new server-to-server support. Fixes CTRL-C and using the
"X" button in a console window to close it, which had regressed since the
server-to-server commit.
Modified:
trunk/reactos/subsystems/csr/csrsrv/api.c
trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c
Modified: trunk/reactos/subsystems/csr/csrsrv/api.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/api.…
==============================================================================
--- trunk/reactos/subsystems/csr/csrsrv/api.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/csr/csrsrv/api.c [iso-8859-1] Sun Feb 19 07:22:37 2012
@@ -1227,7 +1227,7 @@
_SEH2_TRY
{
/* Call the API and get the result */
- Status = (ServerDll->DispatchTable[ApiId])(ReceiveMsg, &Reply);
+ Status = ServerDll->DispatchTable[ApiId](ReceiveMsg, &Reply);
/* Return the result, no matter what it is */
ReplyMsg->Status = Status;
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c [iso-8859-1] Sun Feb 19
07:22:37 2012
@@ -173,6 +173,7 @@
PCSR_PROCESS CsrProcess;
CurrentThread = NtCurrentTeb()->CsrClientThread;
+ if (!CurrentThread) return STATUS_SUCCESS; // server-to-server
CsrProcess = CurrentThread->Process;
if (CsrProcess->ClientId.UniqueProcess !=
Request->Data.CreateThreadRequest.ClientId.UniqueProcess)