[SERVICES][ADVAPI32] Fix the broken service stop sequence
authorEric Kohl <eric.kohl@reactos.org>
Sat, 24 Feb 2018 10:14:05 +0000 (11:14 +0100)
committerEric Kohl <eric.kohl@reactos.org>
Sat, 24 Feb 2018 10:14:05 +0000 (11:14 +0100)
services\database.c:
- Refactor ScmControlService() so that it can be used to send the dispatcher loop stop command.
- Separate the code to decrement the image run counter from the service image cleanup code.

services\rpcserver.c:
- RSetServiceStatus(): Stop the dispatcher loop when the image run counter is zero and remove the service image after that.

advapi32\service\sctrl.c:
- Do not terminate the service dispatcher loop when the last service is being stopped. Wait for an explicit dispatcher stop command (empty service name).

CORE-12413


No differences found