dll: service: FspServiceLoop

Do not reset FspServiceConsoleModeEvent on reentry.
It should be noted that reentry is not feasible,
because StartServiceCtrlDispatcherW returns
ERROR_SERVICE_ALREADY_RUNNING on reentry.
This commit is contained in:
Bill Zissimopoulos 2018-07-27 11:09:43 -07:00
parent 554f07a50e
commit e5c424dba1

View File

@ -251,7 +251,7 @@ FSP_API NTSTATUS FspServiceLoop(FSP_SERVICE *Service)
/* ENTER CONSOLE MODE! */ /* ENTER CONSOLE MODE! */
/* create/reset the console mode event and console control handler */ /* create the console mode event and console control handler */
if (0 == FspServiceConsoleModeEvent) if (0 == FspServiceConsoleModeEvent)
{ {
FspServiceConsoleModeEvent = CreateEventW(0, TRUE, FALSE, 0); FspServiceConsoleModeEvent = CreateEventW(0, TRUE, FALSE, 0);
@ -267,12 +267,14 @@ FSP_API NTSTATUS FspServiceLoop(FSP_SERVICE *Service)
goto console_mode_exit; goto console_mode_exit;
} }
} }
#if 0
else else
{ {
ResetEvent(FspServiceConsoleModeEvent); ResetEvent(FspServiceConsoleModeEvent);
FspServiceConsoleCtrlHandlerDisabled = 0; FspServiceConsoleCtrlHandlerDisabled = 0;
MemoryBarrier(); MemoryBarrier();
} }
#endif
/* prepare the command line arguments */ /* prepare the command line arguments */
Argv = CommandLineToArgvW(GetCommandLineW(), &Argc); Argv = CommandLineToArgvW(GetCommandLineW(), &Argc);