services: Terminate service when its status is set to SERVICE_STOPPED.
This commit is contained in:
parent
01ef66cb1e
commit
c21ede4474
|
@ -697,7 +697,9 @@ DWORD __cdecl svcctl_SetServiceStatus(
|
|||
service->service_entry->status.dwWaitHint = lpServiceStatus->dwWaitHint;
|
||||
service_unlock(service->service_entry);
|
||||
|
||||
if (service->service_entry->status_changed_event)
|
||||
if (lpServiceStatus->dwCurrentState == SERVICE_STOPPED)
|
||||
service_terminate(service->service_entry);
|
||||
else if (service->service_entry->status_changed_event)
|
||||
SetEvent(service->service_entry->status_changed_event);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue