Author: ekohl
Date: Sun Mar  2 23:39:20 2014
New Revision: 62408

URL: http://svn.reactos.org/svn/reactos?rev=62408&view=rev
Log:
[SERVICES]
RSetServiceStatus:  Set the wait hint and check point only if the service is in 
a pending state, otherwise they should be 0.

Modified:
    trunk/reactos/base/system/services/rpcserver.c

Modified: trunk/reactos/base/system/services/rpcserver.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcserver.c?rev=62408&r1=62407&r2=62408&view=diff
==============================================================================
--- trunk/reactos/base/system/services/rpcserver.c      [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/rpcserver.c      [iso-8859-1] Sun Mar  2 
23:39:20 2014
@@ -1661,6 +1661,16 @@
         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();
 


Reply via email to