]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 957] Windows only: Let command line parameters from the Windows SCM GUI override...
authorMartin Burnicki <burnicki@ntp.org>
Sun, 16 Mar 2008 13:15:13 +0000 (09:15 -0400)
committerMartin Burnicki <burnicki@ntp.org>
Sun, 16 Mar 2008 13:15:13 +0000 (09:15 -0400)
bk: 47dd1d61PHYj54GNmk8l18_AVrLWPQ

ChangeLog
ports/winnt/ntpd/ntservice.c

index c57ac210b0086b35663bfdadfc8ba97c3d9c2245..99f67117c70c75cd20e19d86f1330f50c00cf5e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+* [Bug 957] Windows only: Let command line parameters from the Windows SCM GUI
+  override the standard parameters from the ImagePath registry key.
+
 ---
 (4.2.4p4) Released by Harlan Stenn <stenn@ntp.org>
 
index 065f510c040990b17a75651445cd57f04bbb2c47..14a3a83339f2409b2a8e844220cccacdf7de9cf3 100644 (file)
@@ -50,8 +50,17 @@ void ntservice_exit(void);
 
 void WINAPI service_main( DWORD argc, LPTSTR *argv )
 {
-  /* pass the global command line options on to the service */
-  ntpdmain( glb_argc, glb_argv );
+       if ( argc > 1 )
+       {
+               /*
+                * Let command line parameters from the Windows SCM GUI
+                * override the standard parameters from the ImagePath registry key.
+                */
+               glb_argc = argc;
+               glb_argv = argv;
+       }
+
+       ntpdmain( glb_argc, glb_argv );
 }