From: Martin Burnicki Date: Sun, 16 Mar 2008 13:15:13 +0000 (-0400) Subject: [Bug 957] Windows only: Let command line parameters from the Windows SCM GUI override... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bc062d00fa5f9269f02100e8bf160c7176fbe10;p=thirdparty%2Fntp.git [Bug 957] Windows only: Let command line parameters from the Windows SCM GUI override the standard parameters from the ImagePath registry key. bk: 47dd1d61PHYj54GNmk8l18_AVrLWPQ --- diff --git a/ChangeLog b/ChangeLog index c57ac210b0..99f67117c7 100644 --- 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 diff --git a/ports/winnt/ntpd/ntservice.c b/ports/winnt/ntpd/ntservice.c index 065f510c04..14a3a83339 100644 --- a/ports/winnt/ntpd/ntservice.c +++ b/ports/winnt/ntpd/ntservice.c @@ -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 ); }