mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[SERVICES] Send services shutdown notifications only if they accept them.
This commit is contained in:
parent
6c097b4740
commit
1aa359ec7f
1 changed files with 4 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue