Missing return in success path.

 

Casper

 


From: ros-diffs-bounces@reactos.org [mailto:ros-diffs-bounces@reactos.org] On Behalf Of hpoussin@svn.reactos.org
Sent: 30. december 2005 11:29
To: ros-diffs@reactos.org
Subject: [ros-diffs] [hpoussin] 20456: Forward ChangeServiceConfig2W call toservices.exe

 

Forward ChangeServiceConfig2W call to services.exe
Modified: trunk/reactos/include/idl/svcctl.idl
Modified: trunk/reactos/lib/advapi32/advapi32.def
Modified: trunk/reactos/lib/advapi32/service/scm.c
Modified: trunk/reactos/subsys/system/services/rpcserver.c

Modified: trunk/reactos/lib/advapi32/service/scm.c

--- trunk/reactos/lib/advapi32/service/scm.c      2005-12-30 01:41:02 UTC (rev 20455)
+++ trunk/reactos/lib/advapi32/service/scm.c      2005-12-30 10:29:07 UTC (rev 20456)
@@ -78,6 +78,53 @@
 
 
 /**********************************************************************
+ *  ChangeServiceConfig2W
+ *
+ * @implemented
+ */
+BOOL WINAPI
+ChangeServiceConfig2W(SC_HANDLE hService,
+                      DWORD dwInfoLevel,
+                      LPVOID lpInfo)
+{
+    DWORD lpInfoSize;
+    DWORD dwError;
+
+    DPRINT("ChangeServiceConfig2W() called\n");
+
+    /* Determine the length of the lpInfo parameter */
+    switch (dwInfoLevel)
+    {
+        case SERVICE_CONFIG_DESCRIPTION:
+            lpInfoSize = sizeof(SERVICE_DESCRIPTION);
+        case SERVICE_CONFIG_FAILURE_ACTIONS:
+            lpInfoSize = sizeof(SERVICE_FAILURE_ACTIONS);
+        default:
+            DPRINT1("Unknown info level 0x%lx\n", dwInfoLevel);
+            SetLastError(ERROR_INVALID_PARAMETER);
+            return FALSE;
+    }
+
+    if (lpInfo == NULL)
+        return TRUE;
+
+    HandleBind();
+
+    dwError = ScmrChangeServiceConfig2W(BindingHandle,
+                                        (unsigned int)hService,
+                                        dwInfoLevel,
+                                        lpInfo,
+                                        lpInfoSize);
+    if (dwError != ERROR_SUCCESS)
+    {
+        DPRINT1("ScmrChangeServiceConfig2W() failed (Error %lu)\n", dwError);
+        SetLastError(dwError);
+        return FALSE;
+    }
+}
+
+
+/**********************************************************************
  *  ChangeServiceConfigA
  *
  * @implemented
@@ -1553,7 +1600,7 @@
 #if 0
     DWORD dwError;
 
-    DPRINT("StartServiceW()\n", ScLock);
+    DPRINT("StartServiceW()\n");
 
     HandleBind();