[KERNEL32]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 12 Sep 2015 16:23:32 +0000 (16:23 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 12 Sep 2015 16:23:32 +0000 (16:23 +0000)
commit28b957e9706fc1a55e81101ce20767cb2985cf98
tree2e68704ba426f88b2570383b64652a8e5bc770f0
parent38b81a6049b1214d3996fd5135a4f6fadb0f845c
[KERNEL32]
GetNextVDMCommand function:
- Avoid using deep nested levels of indentation.
- Fix the error check conditions (+ status value) for the CsrClientCallServer call to make it compatible with what windows' basesrv can return to us.

[BASESRV]
- Remove some useless "NTAPI" from functions.
- Factor out some code used for creating and destroying console records, and for the destruction of the pair of event handles.
- Use "IsListEmpty" when needed.
- Fix BaseSrvFillCommandInfo so that it returns the needed lengths (even if the user-given lengths are zero) and set the expected status error in case the buffer lenghts are too small (not STATUS_BUFFER_TOO_SMALL but STATUS_INVALID_PARAMETER because it's what kernel32 error check expects, for windows compat; see above).
- Fix initialization of new DOS records: no need to create a new one if there is one already free (status VDM_READY).
- Fix the loop that searches for a valid DOS record containing command information available as well as the conditions in which case our caller needs to wait in GetNextVDMCommand call.

NOTE: The internal state flags of the DOS records have normally nothing to do with the VDM state flags we report back to the user.

CORE-8247 CORE-9711 CORE-9773

svn path=/trunk/; revision=69201
reactos/dll/win32/kernel32/client/vdm.c
reactos/subsystems/win/basesrv/vdm.c
reactos/subsystems/win/basesrv/vdm.h