Author: mturk
Date: Thu Aug 26 16:15:07 2010
New Revision: 989804

URL: http://svn.apache.org/viewvc?rev=989804&view=rev
Log:
APR version 1.4.1 and 1.4.2 have faulty wakeup code

Modified:
    tomcat/native/trunk/native/src/jnilib.c

Modified: tomcat/native/trunk/native/src/jnilib.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/jnilib.c?rev=989804&r1=989803&r2=989804&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/jnilib.c (original)
+++ tomcat/native/trunk/native/src/jnilib.c Thu Aug 26 16:15:07 2010
@@ -61,11 +61,19 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM
     tcn_global_vm = vm;
     env           = (JNIEnv *)ppe;
     /* Before doing anything else check if we have a valid
-     * APR version. We need version 1.4.0 as minimum.
+     * APR version. We need version 1.4.3 as minimum.
      */
     apr_version(&apv);
     apvn = apv.major * 1000 + apv.minor * 100 + apv.patch;
-    if (apvn < 1400) {
+    if (apvn < 1403) {
+        if (apvn > 1400 && apvn < 1403) {
+            /* APR versions below 1.4.3 are known to have
+             * faulty wakeup code on windows platform
+             */
+            tcn_Throw(env, "Unupported APR version (%s)",
+                      apr_version_string());
+            return JNI_ERR;
+        }
 #if defined(HAVE_POOL_PRE_CLEANUP) && defined(HAVE_POLLSET_WAKEUP)
         /* Althugh not 1.4.x, APR has required functionality.
          * Note that this is compile time definition, and we



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to