commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1054899 - /commons/proper/daemon/trunk/src/native/windows/src/javajni.c
Date Tue, 04 Jan 2011 05:11:57 GMT
Author: mturk
Date: Tue Jan  4 05:11:57 2011
New Revision: 1054899

URL: http://svn.apache.org/viewvc?rev=1054899&view=rev
Log:
DAEMON-190 Apply Konstantin's patch

Modified:
    commons/proper/daemon/trunk/src/native/windows/src/javajni.c

Modified: commons/proper/daemon/trunk/src/native/windows/src/javajni.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/javajni.c?rev=1054899&r1=1054898&r2=1054899&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/javajni.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/javajni.c Tue Jan  4 05:11:57 2011
@@ -187,7 +187,7 @@ static BOOL __apxLoadJvmDll(LPCWSTR szJv
         dllJvmPath = apxGetJavaSoftRuntimeLib(NULL);
     if (!dllJvmPath)
         return FALSE;
-    if (GetFileAttributesW(szJvmDllPath) == INVALID_FILE_ATTRIBUTES) {
+    if (GetFileAttributesW(dllJvmPath) == INVALID_FILE_ATTRIBUTES) {
         /* DAEMON-184: RuntimeLib registry key is invalid.
          * Check from Jre JavaHome directly
          */
@@ -205,8 +205,10 @@ static BOOL __apxLoadJvmDll(LPCWSTR szJv
 
     apxLogWrite(APXLOG_MARK_DEBUG "loading jvm '%S'", dllJvmPath);
     _st_sys_jvmDllHandle = LoadLibraryExW(dllJvmPath, NULL, 0);
-    if (GetFileAttributesW(szJvmDllPath) != INVALID_FILE_ATTRIBUTES) {
-        /* Try to load the MSVCRTxx.dll before JVM.dll
+    if (IS_INVALID_HANDLE(_st_sys_jvmDllHandle) &&
+        GetFileAttributesW(dllJvmPath) != INVALID_FILE_ATTRIBUTES) {
+        /* There is a file but cannot be loaded.
+         * Try to load the MSVCRTxx.dll before JVM.dll
          */
         WCHAR  jreBinPath[SIZ_PATHLEN];
         WCHAR  crtBinPath[SIZ_PATHLEN];



Mime
View raw message