Reset a services thread and process ids when the service has been stopped. Fixes...
authorEric Kohl <eric.kohl@reactos.org>
Mon, 1 Feb 2010 19:45:50 +0000 (19:45 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Mon, 1 Feb 2010 19:45:50 +0000 (19:45 +0000)
svn path=/trunk/; revision=45374

reactos/base/system/services/rpcserver.c

index a5b7f9f..193cb9b 100644 (file)
@@ -644,6 +644,14 @@ DWORD RControlService(
     if ((dwError == ERROR_SUCCESS) && (pcbBytesNeeded))
         dwError = ERROR_DEPENDENT_SERVICES_RUNNING;
 
+    if (dwError == ERROR_SUCCESS &&
+        dwControl == SERVICE_CONTROL_STOP && 
+        lpServiceStatus->dwCurrentState == SERVICE_STOPPED)
+    {
+        lpService->ProcessId = 0; /* FIXME */
+        lpService->ThreadId = 0;
+    }
+
     /* Return service status information */
     RtlCopyMemory(lpServiceStatus,
                   &lpService->Status,