[SERVICES]
authorEric Kohl <eric.kohl@reactos.org>
Sun, 2 Mar 2014 23:39:20 +0000 (23:39 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 2 Mar 2014 23:39:20 +0000 (23:39 +0000)
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

reactos/base/system/services/rpcserver.c

index fbe4bb5..692628a 100644 (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();