mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[SERVICES] Send services shutdown notifications only if they accept them.
This commit is contained in:
@@ -2164,10 +2164,11 @@ ScmAutoShutdownServices(VOID)
|
||||
{
|
||||
CurrentService = CONTAINING_RECORD(ServiceEntry, SERVICE, ServiceListEntry);
|
||||
|
||||
if (CurrentService->Status.dwCurrentState == SERVICE_RUNNING ||
|
||||
CurrentService->Status.dwCurrentState == SERVICE_START_PENDING)
|
||||
if ((CurrentService->Status.dwControlsAccepted & SERVICE_ACCEPT_SHUTDOWN) &&
|
||||
(CurrentService->Status.dwCurrentState == SERVICE_RUNNING ||
|
||||
CurrentService->Status.dwCurrentState == SERVICE_START_PENDING))
|
||||
{
|
||||
/* shutdown service */
|
||||
/* Send the shutdown notification */
|
||||
DPRINT("Shutdown service: %S\n", CurrentService->lpServiceName);
|
||||
ScmControlService(CurrentService->lpImage->hControlPipe,
|
||||
CurrentService->lpServiceName,
|
||||
|
||||
Reference in New Issue
Block a user