[SCHEDSVC]

Set service status to SERVICE_STOP_PENDING before setting it to SERVICE_STOPPED.

svn path=/trunk/; revision=74020
This commit is contained in:
Eric Kohl 2017-03-01 21:48:15 +00:00
parent 91d6a8f428
commit fcd6f24ca0

View file

@ -73,6 +73,7 @@ ServiceControlHandler(DWORD dwControl,
{
case SERVICE_CONTROL_STOP:
TRACE(" SERVICE_CONTROL_STOP received\n");
UpdateServiceStatus(SERVICE_STOP_PENDING);
/* Stop listening to incoming RPC messages */
RpcMgmtStopServerListening(NULL);
UpdateServiceStatus(SERVICE_STOPPED);
@ -96,6 +97,7 @@ ServiceControlHandler(DWORD dwControl,
case SERVICE_CONTROL_SHUTDOWN:
TRACE(" SERVICE_CONTROL_SHUTDOWN received\n");
UpdateServiceStatus(SERVICE_STOP_PENDING);
UpdateServiceStatus(SERVICE_STOPPED);
return ERROR_SUCCESS;