Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 91843 invoked from network); 3 Sep 2010 05:22:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Sep 2010 05:22:55 -0000 Received: (qmail 55171 invoked by uid 500); 3 Sep 2010 05:22:55 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 54907 invoked by uid 500); 3 Sep 2010 05:22:52 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 54898 invoked by uid 99); 3 Sep 2010 05:22:51 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 05:22:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 05:22:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3596523889B9; Fri, 3 Sep 2010 05:22:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r992208 - in /tomcat/native/trunk/native/src: network.c pool.c Date: Fri, 03 Sep 2010 05:22:08 -0000 To: dev@tomcat.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100903052208.3596523889B9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturk Date: Fri Sep 3 05:22:07 2010 New Revision: 992208 URL: http://svn.apache.org/viewvc?rev=992208&view=rev Log: Don't destroy pools explicitly if we are inside apr_terminate call Modified: tomcat/native/trunk/native/src/network.c tomcat/native/trunk/native/src/pool.c Modified: tomcat/native/trunk/native/src/network.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/network.c?rev=992208&r1=992207&r2=992208&view=diff ============================================================================== --- tomcat/native/trunk/native/src/network.c (original) +++ tomcat/native/trunk/native/src/network.c Fri Sep 3 05:22:07 2010 @@ -222,6 +222,11 @@ TCN_IMPLEMENT_CALL(void, Socket, destroy UNREFERENCED_STDARGS; TCN_ASSERT(sock != 0); + if (!tcn_global_pool) { + /* Socket will be destroyed by the cleanup + */ + return; + } as = s->sock; s->sock = NULL; apr_pool_cleanup_kill(s->pool, s, sp_socket_cleanup); Modified: tomcat/native/trunk/native/src/pool.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/pool.c?rev=992208&r1=992207&r2=992208&view=diff ============================================================================== --- tomcat/native/trunk/native/src/pool.c (original) +++ tomcat/native/trunk/native/src/pool.c Fri Sep 3 05:22:07 2010 @@ -69,7 +69,8 @@ TCN_IMPLEMENT_CALL(void, Pool, destroy)( apr_pool_t *p = J2P(pool, apr_pool_t *); UNREFERENCED_STDARGS; TCN_ASSERT(pool != 0); - apr_pool_destroy(p); + if (tcn_global_pool) + apr_pool_destroy(p); } TCN_IMPLEMENT_CALL(jlong, Pool, parentGet)(TCN_STDARGS, jlong pool) @@ -179,7 +180,7 @@ static apr_status_t generic_pool_data_cl if (data) { JNIEnv *env; tcn_get_java_env(&env); - + if (!TCN_IS_NULL(env, cb->obj)) { TCN_UNLOAD_CLASS(env, cb->obj); } @@ -204,7 +205,7 @@ TCN_IMPLEMENT_CALL(jint, Pool, dataSet)( apr_pool_cleanup_run(p, old, generic_pool_data_cleanup); } if (data) { - JNIEnv *e; + JNIEnv *e; tcn_callback_t *cb = (tcn_callback_t *)malloc(sizeof(tcn_callback_t)); tcn_get_java_env(&e); cb->obj = (*e)->NewGlobalRef(e, data); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org