You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mm...@apache.org on 2002/02/13 02:07:18 UTC

cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c

mmanders    02/02/12 17:07:18

  Modified:    jk/native/common jk_ajp_common.c
  Log:
  Initialize secret before checking cache since we might return from inside of the cache checking loop.
  
  Revision  Changes    Path
  1.24      +9 -2      jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- jk_ajp_common.c	6 Feb 2002 19:11:23 -0000	1.23
  +++ jk_ajp_common.c	13 Feb 2002 01:07:18 -0000	1.24
  @@ -59,7 +59,7 @@
    * Description: common stuff for bi-directional protocols ajp13/ajp14.     *
    * Author:      Gal Shachor <sh...@il.ibm.com>                           *
    * Author:      Henri Gomez <hg...@slib.fr>                               *
  - * Version:     $Revision: 1.23 $                                           *
  + * Version:     $Revision: 1.24 $                                           *
    ***************************************************************************/
   
   
  @@ -1235,6 +1235,14 @@
       if (pThis && pThis->worker_private) {
           ajp_worker_t *p = pThis->worker_private;
           int cache_sz = jk_get_worker_cache_size(props, p->name, cache);
  +        
  +        /* 
  +         *  Need to initialize secret here since we could return from inside
  +         *  of the following loop
  +         */
  +           
  +        p->secret = jk_get_worker_secret(props, p->name );
  +
           if (cache_sz > 0) {
               p->ep_cache = (ajp_endpoint_t **)malloc(sizeof(ajp_endpoint_t *) * cache_sz);
               if(p->ep_cache) {
  @@ -1249,7 +1257,6 @@
                   }
               }
           }
  -        p->secret = jk_get_worker_secret(props, p->name );
       } else {
           jk_log(l, JK_LOG_ERROR, "In jk_worker_t::init, NULL parameters\n");
       }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>