commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1051146 - in /commons/proper/daemon/trunk/src/native/windows/src: service.c utils.c
Date Mon, 20 Dec 2010 15:35:16 GMT
Author: mturk
Date: Mon Dec 20 15:35:15 2010
New Revision: 1051146

URL: http://svn.apache.org/viewvc?rev=1051146&view=rev
Log:
Combine core dependencies with --DependsOn cmdline

Modified:
    commons/proper/daemon/trunk/src/native/windows/src/service.c
    commons/proper/daemon/trunk/src/native/windows/src/utils.c

Modified: commons/proper/daemon/trunk/src/native/windows/src/service.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/service.c?rev=1051146&r1=1051145&r2=1051146&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/service.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/service.c Mon Dec 20 15:35:15 2010
@@ -517,6 +517,11 @@ apxServiceInstall(APXHANDLE hService, LP
     lpService->stServiceEntry.lpConfig = NULL;
     AplZeroMemory(&lpService->stServiceEntry, sizeof(APXSERVENTRY));
 
+    if (lpDependencies)
+        lpDependencies = apxMultiSzCombine(NULL, lpDependencies,
+                                           L"Tcpip\0Afd\0", NULL);
+    else
+        lpDependencies = L"Tcpip\0Afd\0";
     lpService->hService = CreateServiceW(lpService->hManager,
                                          szServiceName,
                                          szDisplayName,
@@ -527,7 +532,7 @@ apxServiceInstall(APXHANDLE hService, LP
                                          szImagePath,
                                          NULL,
                                          NULL,
-                                         lpDependencies ? lpDependencies : L"Tcpip\0Afd\0",
+                                         lpDependencies,
                                          NULL,
                                          NULL);
 

Modified: commons/proper/daemon/trunk/src/native/windows/src/utils.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/utils.c?rev=1051146&r1=1051145&r2=1051146&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/utils.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/utils.c Mon Dec 20 15:35:15 2010
@@ -256,7 +256,7 @@ LPWSTR apxMultiSzCombine(APXHANDLE hPool
     if (lb) {
         AplMoveMemory(&rv[la], lpStrB, lb * sizeof(WCHAR));
     }
-    if (*lpdwLength)
+    if (lpdwLength)
         *lpdwLength = (la + lb + 1) * sizeof(WCHAR);
     return rv;
 }



Mime
View raw message