mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +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);
|
CurrentService = CONTAINING_RECORD(ServiceEntry, SERVICE, ServiceListEntry);
|
||||||
|
|
||||||
if (CurrentService->Status.dwCurrentState == SERVICE_RUNNING ||
|
if ((CurrentService->Status.dwControlsAccepted & SERVICE_ACCEPT_SHUTDOWN) &&
|
||||||
CurrentService->Status.dwCurrentState == SERVICE_START_PENDING)
|
(CurrentService->Status.dwCurrentState == SERVICE_RUNNING ||
|
||||||
|
CurrentService->Status.dwCurrentState == SERVICE_START_PENDING))
|
||||||
{
|
{
|
||||||
/* shutdown service */
|
/* Send the shutdown notification */
|
||||||
DPRINT("Shutdown service: %S\n", CurrentService->lpServiceName);
|
DPRINT("Shutdown service: %S\n", CurrentService->lpServiceName);
|
||||||
ScmControlService(CurrentService->lpImage->hControlPipe,
|
ScmControlService(CurrentService->lpImage->hControlPipe,
|
||||||
CurrentService->lpServiceName,
|
CurrentService->lpServiceName,
|
||||||
|
|
Loading…
Reference in a new issue