This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git


The following commit(s) were added to refs/heads/master by this push:
     new 3f2f406  Partial fix for DAEMON-458
3f2f406 is described below

commit 3f2f406cd4a0042c5cf957534281e2901da1d7b5
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Apr 20 13:53:12 2023 +0100

    Partial fix for DAEMON-458
    
    Only use the configured dependencies if explicitly set. Otherwise use
    the existing setting including any set via 'sc config'. Note that once
    DependsOn has been used, the value set via 'DependsOn' will take
    priority any time the service is updated via Procrun.
    
    https://issues.apache.org/jira/browse/DAEMON-458
---
 src/native/windows/src/service.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/native/windows/src/service.c b/src/native/windows/src/service.c
index 538e980..a6fbbde 100644
--- a/src/native/windows/src/service.c
+++ b/src/native/windows/src/service.c
@@ -306,12 +306,10 @@ apxServiceSetOptions(APXHANDLE hService,
         return FALSE;
     }
 
-    /* Add the mandatory dependencies */
     if (lpDependencies) {
+        /* Add the mandatory dependencies to the explicitly configured 
dependencies */
         lpDependencies = apxMultiSzCombine(NULL, lpDependencies,
                                            L"Tcpip\0Afd\0", NULL);
-    } else {
-        lpDependencies = L"Tcpip\0Afd\0";
     }
 
     if (!ChangeServiceConfig(lpService->hService, dwServiceType,

Reply via email to