mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[BASESRV]
In BaseSrvGetConsoleRecord and GetConsoleRecordBySessionId, check if the console record was not found instead of returning the last one in the list. In BaseSrvCheckVDM, return the session ID to the caller. svn path=/branches/ntvdm/; revision=63120
This commit is contained in:
parent
fdf472cb6e
commit
9c142126d3
1 changed files with 7 additions and 0 deletions
|
@ -36,6 +36,9 @@ NTSTATUS NTAPI BaseSrvGetConsoleRecord(HANDLE ConsoleHandle, PVDM_CONSOLE_RECORD
|
|||
if (CurrentRecord->ConsoleHandle == ConsoleHandle) break;
|
||||
}
|
||||
|
||||
/* Check if nothing was found */
|
||||
if (i == &VDMConsoleListHead) CurrentRecord = NULL;
|
||||
|
||||
*Record = CurrentRecord;
|
||||
return CurrentRecord ? STATUS_SUCCESS : STATUS_NOT_FOUND;
|
||||
}
|
||||
|
@ -52,6 +55,9 @@ NTSTATUS NTAPI GetConsoleRecordBySessionId(ULONG TaskId, PVDM_CONSOLE_RECORD *Re
|
|||
if (CurrentRecord->SessionId == TaskId) break;
|
||||
}
|
||||
|
||||
/* Check if nothing was found */
|
||||
if (i == &VDMConsoleListHead) CurrentRecord = NULL;
|
||||
|
||||
*Record = CurrentRecord;
|
||||
return CurrentRecord ? STATUS_SUCCESS : STATUS_NOT_FOUND;
|
||||
}
|
||||
|
@ -656,6 +662,7 @@ CSR_API(BaseSrvCheckVDM)
|
|||
InsertTailList(&VDMConsoleListHead, &ConsoleRecord->Entry);
|
||||
}
|
||||
|
||||
CheckVdmRequest->iTask = ConsoleRecord->SessionId;
|
||||
CheckVdmRequest->VDMState = NewConsoleRecord ? VDM_NOT_LOADED : VDM_READY;
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue