You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2010/02/23 08:26:02 UTC

svn commit: r915219 - /tomcat/jk/trunk/native/common/jk_ajp_common.c

Author: rjung
Date: Tue Feb 23 07:26:02 2010
New Revision: 915219

URL: http://svn.apache.org/viewvc?rev=915219&view=rev
Log:
Revert my r915085, because otherwise ae->reuse
might crash. Instead reset ae to NULL after use.

Modified:
    tomcat/jk/trunk/native/common/jk_ajp_common.c

Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=915219&r1=915218&r2=915219&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_ajp_common.c (original)
+++ tomcat/jk/trunk/native/common/jk_ajp_common.c Tue Feb 23 07:26:02 2010
@@ -3056,8 +3056,8 @@
                 for (slot = 0; slot < aw->ep_cache_sz; slot++) {
                     if (aw->ep_cache[slot] &&
                         IS_VALID_SOCKET(aw->ep_cache[slot]->sd)) {
+                        ae = aw->ep_cache[slot];
                         if (ae->reuse) {
-                            ae = aw->ep_cache[slot];
                             aw->ep_cache[slot] = NULL;
                             break;
                         }
@@ -3065,7 +3065,8 @@
                             /* XXX: We shouldn't have non reusable
                              * opened socket in the cache
                              */
-                            ajp_reset_endpoint(aw->ep_cache[slot], l);
+                            ajp_reset_endpoint(ae, l);
+                            ae = NULL;
                             jk_log(l, JK_LOG_WARNING,
                                    "closing non reusable pool slot=%d", slot);
                         }



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