tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmand...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
Date Thu, 11 Apr 2002 21:52:43 GMT
mmanders    02/04/11 14:52:43

  Modified:    jk/native/apache-2.0 mod_jk.c
  Log:
  Updated to build for  Apache 2.0 on NetWare (LibC).  Added a cleanup routine
  
  Revision  Changes    Path
  1.42      +38 -8     jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- mod_jk.c	2 Apr 2002 00:42:11 -0000	1.41
  +++ mod_jk.c	11 Apr 2002 21:52:43 -0000	1.42
  @@ -60,7 +60,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    *                 Henri Gomez <hgomez@slib.fr>                               *
  - * Version:     $Revision: 1.41 $                                           *
  + * Version:     $Revision: 1.42 $                                           *
    ***************************************************************************/
   
   /*
  @@ -90,12 +90,12 @@
    * Jakarta (jk_) include files
    */
   #ifdef NETWARE
  -#define _SYS_TYPES_H_
  -#define _NETDB_H_INCLUDED
  -#define _IN_
  -#define _INET_
  -#define _SYS_TIMEVAL_H_
  -#define _SYS_SOCKET_H_
  +#define __sys_types_h__
  +#define __sys_socket_h__
  +#define __netdb_h__
  +#define __netinet_in_h__
  +#define __arpa_inet_h__
  +#define __sys_timeval_h__
   #endif
   #include "jk_global.h"
   #include "jk_util.h"
  @@ -1281,7 +1281,7 @@
           apr_pool_t *parent_pool= apr_pool_get_parent( rpool );
           apr_pool_t *tpool= apr_pool_get_parent( parent_pool );
           
  -        apr_pool_userdata_get( &end, "jk_thread_endpoint", tpool );
  +        apr_pool_userdata_get( (void **)&end, "jk_thread_endpoint", tpool );
           if(end==NULL ) {
               worker->get_endpoint(worker, &end, l);
               apr_pool_userdata_set( end , "jk_thread_endpoint", 
  @@ -1466,6 +1466,35 @@
       return overrides;
   }
   
  +/** Standard apache hook, cleanup jk
  + */
  +static apr_status_t jk_child_exit(void *data)
  +{
  +    server_rec *s = data;
  +    
  +    while (NULL != s)
  +    {
  +        jk_server_conf_t *conf =
  +            (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
  +    
  +    
  +        if (conf)
  +        {
  +            wc_close(conf->log);
  +            if (conf->worker_properties)
  +                map_free(&conf->worker_properties);
  +            if (conf->uri_to_context)
  +                map_free(&conf->uri_to_context);
  +            if (conf->automount)
  +                map_free(&conf->automount);
  +            if (conf->uw_map)
  +                uri_worker_map_free(&conf->uw_map, conf->log);
  +            jk_close_file_logger(&conf->log);
  +        }
  +        s = s->next;
  +    }
  +}
  +
   /** Standard apache callback, initialize jk.
    */
   static void jk_child_init(apr_pool_t *pconf, 
  @@ -1474,6 +1503,7 @@
       jk_server_conf_t *conf =
           (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
   
  +    apr_pool_cleanup_register(pconf, s, jk_child_exit, jk_child_exit);
   /*     init_jk( pconf, conf, s ); */
   }
   
  
  
  

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


Mime
View raw message