Author: aandrejevic
Date: Sat May 3 02:34:40 2014
New Revision: 63125
URL:
http://svn.reactos.org/svn/reactos?rev=63125&view=rev
Log:
[KERNEL32][BASESRV]
Move the console/ID checking code from kernel32 to basesrv.
Modified:
branches/ntvdm/dll/win32/kernel32/client/vdm.c
branches/ntvdm/subsystems/win/basesrv/vdm.c
Modified: branches/ntvdm/dll/win32/kernel32/client/vdm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/dll/win32/kernel32/client…
==============================================================================
--- branches/ntvdm/dll/win32/kernel32/client/vdm.c [iso-8859-1] (original)
+++ branches/ntvdm/dll/win32/kernel32/client/vdm.c [iso-8859-1] Sat May 3 02:34:40 2014
@@ -401,17 +401,8 @@
CSR_CREATE_API_NUMBER(BASESRV_SERVERDLL_INDEX,
BasepCheckVDM),
sizeof(BASE_CHECK_VDM));
- /* Check if there is no console */
- if (CheckVdm->ConsoleHandle == NULL)
- {
- /* Write back the task ID */
- *iTask = CheckVdm->iTask;
- }
- else
- {
- /* Otherwise, iTask should be zero */
- *iTask = 0;
- }
+ /* Write back the task ID */
+ *iTask = CheckVdm->iTask;
Cleanup:
Modified: branches/ntvdm/subsystems/win/basesrv/vdm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/win/basesrv/vd…
==============================================================================
--- branches/ntvdm/subsystems/win/basesrv/vdm.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/win/basesrv/vdm.c [iso-8859-1] Sat May 3 02:34:40 2014
@@ -665,7 +665,13 @@
InsertTailList(&VDMConsoleListHead, &ConsoleRecord->Entry);
}
- CheckVdmRequest->iTask = ConsoleRecord->SessionId;
+ if (ConsoleRecord->ConsoleHandle == NULL)
+ {
+ /* The parent doesn't have a console, so return the session ID */
+ CheckVdmRequest->iTask = ConsoleRecord->SessionId;
+ }
+ else CheckVdmRequest->iTask = 0;
+
CheckVdmRequest->VDMState = NewConsoleRecord ? VDM_NOT_LOADED : VDM_READY;
Status = STATUS_SUCCESS;
}