commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r937223 - in /commons/proper/daemon/trunk/src: native/nt/procrun/src/cmdline.c samples/ProcrunServiceInstall.cmd
Date Fri, 23 Apr 2010 10:02:38 GMT
Author: mturk
Date: Fri Apr 23 10:02:38 2010
New Revision: 937223

URL: http://svn.apache.org/viewvc?rev=937223&view=rev
Log:
Fix DAEMON-148 by breaking on unknown program option

Modified:
    commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c
    commons/proper/daemon/trunk/src/samples/ProcrunServiceInstall.cmd

Modified: commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c?rev=937223&r1=937222&r2=937223&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c (original)
+++ commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c Fri Apr 23 10:02:38 2010
@@ -131,6 +131,7 @@ LPAPXCMDLINE apxCmdlineParse(
             else {
                 apxLogWrite(APXLOG_MARK_ERROR "Unrecognized cmd option %S",
                             _st_sys_argvw[1]);
+                return NULL;
             }
             s = 2;
         }
@@ -221,6 +222,14 @@ LPAPXCMDLINE apxCmdlineParse(
                 break;
             }
         }
+        if (match == 0) {
+            /* --unknown option
+             *
+             */
+            apxLogWrite(APXLOG_MARK_ERROR "Unrecognized program option %S",
+                        _st_sys_argvw[i]);
+            return NULL;
+        }
     }
     if (i < (DWORD)_st_sys_argc) {
         lpCmdline->dwArgc = _st_sys_argc - i;

Modified: commons/proper/daemon/trunk/src/samples/ProcrunServiceInstall.cmd
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/samples/ProcrunServiceInstall.cmd?rev=937223&r1=937222&r2=937223&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/samples/ProcrunServiceInstall.cmd (original)
+++ commons/proper/daemon/trunk/src/samples/ProcrunServiceInstall.cmd Fri Apr 23 10:02:38
2010
@@ -30,7 +30,7 @@ set MYPATH=%~dp0
 
 rem location of Prunsrv
 set PATH_PRUNSRV=%MYPATH%
-
+set PR_LOGPATH=%PATH_PRUNSRV%
 rem location of jarfile
 set PATH_JAR=%MYPATH%
 
@@ -41,7 +41,7 @@ rem Install the 2 services
 
 echo Installing %SERVICE_JVM%
 %PRUNSRV% //DS//%SERVICE_JVM%
-%PRUNSRV% //IS//%SERVICE_JVM% --Install
+%PRUNSRV% //IS//%SERVICE_JVM%
 
 echo Setting the parameters for %SERVICE_JVM%
 %PRUNSRV% //US//%SERVICE_JVM% --Jvm=auto --StdOutput auto --StdError auto ^
@@ -53,7 +53,7 @@ echo Installation of %SERVICE_JVM% is co
 
 echo Installing %SERVICE_JAVA%
 %PRUNSRV% //DS//%SERVICE_JAVA%
-%PRUNSRV% //IS//%SERVICE_JAVA% --Install
+%PRUNSRV% //IS//%SERVICE_JAVA%
 
 echo Setting the parameters for %SERVICE_JAVA%
 %PRUNSRV% //US//%SERVICE_JAVA% --Jvm=auto --StdOutput auto --StdError auto ^



Mime
View raw message