[SERVICES]

RSetServiceStatus:  Set the wait hint and check point only if the service is in a pending state, otherwise they should be 0.

svn path=/trunk/; revision=62408
This commit is contained in:
Eric Kohl 2014-03-02 23:39:20 +00:00
parent d0ba06e7f2
commit 6e275a78d2

View file

@ -1661,6 +1661,16 @@ DWORD RSetServiceStatus(
return ERROR_INVALID_DATA;
}
/* Set the wait hint and check point only if the service is in a pending state,
otherwise they should be 0 */
if (lpServiceStatus->dwCurrentState == SERVICE_STOPPED ||
lpServiceStatus->dwCurrentState == SERVICE_PAUSED ||
lpServiceStatus->dwCurrentState == SERVICE_RUNNING)
{
lpServiceStatus->dwWaitHint = 0;
lpServiceStatus->dwCheckPoint = 0;
}
/* Lock the service database exclusively */
ScmLockDatabaseExclusive();