commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r907259 - /commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c
Date Sat, 06 Feb 2010 17:15:05 GMT
Author: mturk
Date: Sat Feb  6 17:15:05 2010
New Revision: 907259

URL: http://svn.apache.org/viewvc?rev=907259&view=rev
Log:
Fix DAEMON-112 by applying the patch provided by Jack Cai

Modified:
    commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c

Modified: commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c?rev=907259&r1=907258&r2=907259&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c (original)
+++ commons/proper/daemon/trunk/src/native/nt/procrun/apps/prunsrv/prunsrv.c Sat Feb  6 17:15:05
2010
@@ -1196,13 +1196,19 @@
             _jni_rparam = SO_STARTPARAMS;
         }
         else if (!lstrcmpiW(SO_STARTMODE, PRSRV_JAVA)) {
-            LPWSTR jx = NULL, szJH = apxGetJavaSoftHome(gPool, FALSE);
+            LPWSTR jx = NULL, szJH = SO_JAVAHOME;
+            if (!szJH)
+                szJH = apxGetJavaSoftHome(gPool, FALSE);
             if (szJH) {
                 jx = apxPoolAlloc(gPool, (lstrlenW(szJH) + 16) * sizeof(WCHAR));
                 lstrcpyW(jx, szJH);
                 lstrcatW(jx, PRSRV_JBIN);
                 SO_STARTPATH = szJH;
             }
+            else {
+                apxLogWrite(APXLOG_MARK_ERROR "Unable to find Java Runtime Environment.");
+                goto cleanup;
+            }
             /* StartImage now contains the full path to the java.exe */
             SO_STARTIMAGE = jx;
         }
@@ -1216,13 +1222,19 @@
             _jni_sparam = SO_STOPPARAMS;
         }
         else if (!lstrcmpiW(SO_STOPMODE, PRSRV_JAVA)) {
-            LPWSTR jx = NULL, szJH = apxGetJavaSoftHome(gPool, FALSE);
+            LPWSTR jx = NULL, szJH = SO_JAVAHOME;
+            if (!szJH)
+                szJH = apxGetJavaSoftHome(gPool, FALSE);
             if (szJH) {
                 jx = apxPoolAlloc(gPool, (lstrlenW(szJH) + 16) * sizeof(WCHAR));
                 lstrcpyW(jx, szJH);
                 lstrcatW(jx, PRSRV_JBIN);
                 SO_STOPPATH = szJH;
             }
+            else {
+                apxLogWrite(APXLOG_MARK_ERROR "Unable to find Java Runtime Environment.");
+                goto cleanup;
+            }
             /* StopImage now contains the full path to the java.exe */
             SO_STOPIMAGE = jx;
         }



Mime
View raw message