You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2003/05/01 17:12:40 UTC

cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c

mturk       2003/05/01 08:12:40

  Modified:    jk/native/apache-2.0 mod_jk.c
  Log:
  Added log cleanup function.
  Reverted conf cleanup from post_config hook.
  Deleted some unused variable declarations.
  
  Revision  Changes    Path
  1.74      +13 -7     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.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- mod_jk.c	30 Apr 2003 15:32:14 -0000	1.73
  +++ mod_jk.c	1 May 2003 15:12:40 -0000	1.74
  @@ -453,7 +453,7 @@
   static int get_content_length(request_rec *r)
   {
       if(r->clength > 0) {
  -        return r->clength;
  +        return (int)r->clength;
       } else if(r->main == NULL || r->main == r) {
           char *lenp = (char *)apr_table_get(r->headers_in, "Content-Length");
   
  @@ -806,9 +806,7 @@
                                         const char *value)
   {
       server_rec *s = cmd->server;
  -    struct stat statbuf;
       char *oldv;
  -    int rc;
   
       jk_server_conf_t *conf =
           (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
  @@ -950,8 +948,8 @@
       return cp ? cp : "-";
   }
   
  -static int request_log_transaction(request_rec *r,
  -                                  jk_server_conf_t *conf)
  +static void request_log_transaction(request_rec *r,
  +                                    jk_server_conf_t *conf)
   {
       request_log_format_item *items;
       char *str, *s;
  @@ -978,6 +976,7 @@
       *s = 0;
       
       jk_log(conf->log, JK_LOG_REQUEST, "%s", str);
  +    
   }
   
   /*****************************************************************
  @@ -1218,7 +1217,6 @@
                                       const char **sa)
   {
       const char *s = *sa;
  -    int i;
       struct log_item_list *l;
   
       if (*s != '%') {
  @@ -1956,6 +1954,7 @@
   
       c->s = s;
   
  +    apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup);
       return c;
   }
   
  @@ -2077,6 +2076,13 @@
   ** +-------------------------------------------------------+
   */
   
  +static apr_status_t jklog_cleanup(void *d)
  +{
  +    /* set the main_log to NULL */
  +    main_log = NULL;
  +    return APR_SUCCESS;
  +}
  +
   static void open_jklog(server_rec *s, apr_pool_t *p)
   {
       jk_server_conf_t *conf;
  @@ -2137,6 +2143,7 @@
           conf->log = jkl;
           if (main_log == NULL)
               main_log = conf->log;
  +        apr_pool_cleanup_register(p, main_log, jklog_cleanup, jklog_cleanup);
           return;
       }
   
  @@ -2234,7 +2241,6 @@
           open_jklog(s, pconf);
       }
   
  -    apr_pool_cleanup_register(pconf, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup);
       return OK;
   }
   
  
  
  

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