tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1681316 - in /tomcat/native/trunk/native: configure.in src/jnilib.c src/network.c src/pool.c
Date Sat, 23 May 2015 10:50:07 GMT
Author: rjung
Date: Sat May 23 10:50:06 2015
New Revision: 1681316

URL: http://svn.apache.org/r1681316
Log:
We require version 1.4.3, so pool pre cleanup
and unmanaged pools are always available.

Modified:
    tomcat/native/trunk/native/configure.in
    tomcat/native/trunk/native/src/jnilib.c
    tomcat/native/trunk/native/src/network.c
    tomcat/native/trunk/native/src/pool.c

Modified: tomcat/native/trunk/native/configure.in
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/configure.in?rev=1681316&r1=1681315&r2=1681316&view=diff
==============================================================================
--- tomcat/native/trunk/native/configure.in (original)
+++ tomcat/native/trunk/native/configure.in Sat May 23 10:50:06 2015
@@ -211,8 +211,6 @@ case $host in
         ;;
 esac
 
-TCN_FIND_APR_FEATURE([apr_pool_pre_cleanup_register],[POOL_PRE_CLEANUP])
-TCN_FIND_APR_FEATURE([apr_pool_create_unmanaged_ex],[POOL_UNMANAGED])
 TCN_FIND_APR_FEATURE([apr_pollset_wakeup],[POLLSET_WAKEUP])
 
 AC_SUBST(TCNATIVE_EXPORT_LIBS)

Modified: tomcat/native/trunk/native/src/jnilib.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/jnilib.c?rev=1681316&r1=1681315&r2=1681316&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/jnilib.c (original)
+++ tomcat/native/trunk/native/src/jnilib.c Sat May 23 10:50:06 2015
@@ -60,27 +60,11 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM
     apr_version(&apv);
     apvn = apv.major * 1000 + apv.minor * 100 + apv.patch;
     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, "Unsupported APR version %s: this tcnative requires at least 1.4.3",
-                      apr_version_string());
-            return JNI_ERR;
-        }
-#if defined(HAVE_POOL_PRE_CLEANUP) && defined(HAVE_POLLSET_WAKEUP)
-        /* Although not 1.4.x, APR has required functionality.
-         * Note that this is compile time definition, and we
-         * presume the required API's are present in the custom APR.
-         */
-#else
         tcn_Throw(env, "Unsupported APR version %s: this tcnative requires at least 1.4.3",
                   apr_version_string());
         return JNI_ERR;
-#endif
     }
 
-
     /* Initialize global java.lang.String class */
     TCN_LOAD_CLASS(env, jString_class, "java/lang/String", JNI_ERR);
     TCN_LOAD_CLASS(env, jFinfo_class, TCN_FINFO_CLASS, JNI_ERR);

Modified: tomcat/native/trunk/native/src/network.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/network.c?rev=1681316&r1=1681315&r2=1681316&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/network.c (original)
+++ tomcat/native/trunk/native/src/network.c Sat May 23 10:50:06 2015
@@ -194,14 +194,8 @@ TCN_IMPLEMENT_CALL(jlong, Socket, create
         TCN_THROW_IF_ERR(apr_socket_create(&s,
                          f, t, protocol, c), a);
     }
-#ifdef HAVE_POOL_PRE_CLEANUP
     apr_pool_pre_cleanup_register(c, (const void *)a,
                                   sp_socket_cleanup);
-#else
-    apr_pool_cleanup_register(c, (const void *)a,
-                              sp_socket_cleanup,
-                              apr_pool_cleanup_null);
-#endif
 
 #ifdef TCN_DO_STATISTICS
     sp_created++;
@@ -394,15 +388,8 @@ TCN_IMPLEMENT_CALL(jlong, Socket, accept
         TCN_THROW_IF_ERR(apr_socket_accept(&n, s->sock, p), n);
 
         a->pool = p;
-#ifdef HAVE_POOL_PRE_CLEANUP
         apr_pool_pre_cleanup_register(a->pool, (const void *)a,
                                       sp_socket_cleanup);
-#else
-        apr_pool_cleanup_register(a->pool, (const void *)a,
-                                  sp_socket_cleanup,
-                                  apr_pool_cleanup_null);
-#endif
-
     }
     else {
         tcn_ThrowAPRException(e, APR_ENOTIMPL);

Modified: tomcat/native/trunk/native/src/pool.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/pool.c?rev=1681316&r1=1681315&r2=1681316&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/pool.c (original)
+++ tomcat/native/trunk/native/src/pool.c Sat May 23 10:50:06 2015
@@ -50,7 +50,6 @@ cleanup:
     return P2J(n);
 }
 
-#if defined(HAVE_POOL_UNMANAGED)
 TCN_IMPLEMENT_CALL(jlong, Pool, unmanaged)(TCN_STDARGS)
 {
     apr_pool_t *n;
@@ -60,13 +59,6 @@ TCN_IMPLEMENT_CALL(jlong, Pool, unmanage
 cleanup:
     return P2J(n);
 }
-#else
-TCN_IMPLEMENT_CALL(jlong, Pool, unmanaged)(TCN_STDARGS)
-{
-    UNREFERENCED_STDARGS;
-    return 0;
-}
-#endif
 
 TCN_IMPLEMENT_CALL(void, Pool, clear)(TCN_STDARGS, jlong pool)
 {



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


Mime
View raw message