Author: aandrejevic
Date: Mon Apr 28 20:51:59 2014
New Revision: 63039
URL:
http://svn.reactos.org/svn/reactos?rev=63039&view=rev
Log:
[BASESRV]
Don't update the state of the old DOS records if the DOS program executed another
program.
Modified:
branches/ntvdm/subsystems/win/basesrv/vdm.c
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] Mon Apr 28 20:51:59 2014
@@ -850,18 +850,20 @@
GetNextVdmCommandRequest->iTask = ConsoleRecord->SessionId;
GetNextVdmCommandRequest->WaitObjectForVDM = NULL;
- // HACK: I'm not sure if this should happen...
- for (i = ConsoleRecord->DosListHead.Flink; i !=
&ConsoleRecord->DosListHead; i = i->Flink)
- {
- DosRecord = CONTAINING_RECORD(i, VDM_DOS_RECORD, Entry);
- if (DosRecord->State == VDM_NOT_READY)
+ if (!(GetNextVdmCommandRequest->VDMState & VDM_NOT_READY))
+ {
+ for (i = ConsoleRecord->DosListHead.Flink; i !=
&ConsoleRecord->DosListHead; i = i->Flink)
{
- /* If NTVDM is asking for a new command, it means these are done */
- DosRecord->State = VDM_READY;
-
- NtSetEvent(DosRecord->ServerEvent, NULL);
- NtClose(DosRecord->ServerEvent);
- DosRecord->ServerEvent = NULL;
+ DosRecord = CONTAINING_RECORD(i, VDM_DOS_RECORD, Entry);
+ if (DosRecord->State == VDM_NOT_READY)
+ {
+ /* If NTVDM is asking for a new command, it means these are done */
+ DosRecord->State = VDM_READY;
+
+ NtSetEvent(DosRecord->ServerEvent, NULL);
+ NtClose(DosRecord->ServerEvent);
+ DosRecord->ServerEvent = NULL;
+ }
}
}