httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/modules/loggers mod_log_config.c
Date Fri, 20 Apr 2001 17:59:08 GMT
stoddard    01/04/20 10:59:08

  Modified:    .        CHANGES
               modules/loggers mod_log_config.c
  Log:
  Fix seg fault at start-up introduced by Ryan's change to enabl
  modules to specify their own logging tags. mod_log_config
  registers an optional function, ap_register_log_handler().
  ap_register_log_handler() was being called by http_core before
  the directive hash table was created. This patch creates the
  directive hash table before ap_register_log_handler() is
  registered as an optional function.
  
  Submitted by:  [jean-frederic clere <jfrederic.clere@fujitsu-siemens.com>]
  Reviewed by:  Jeff Trawick, Bill Stoddard
  
  Revision  Changes    Path
  1.180     +8 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.179
  retrieving revision 1.180
  diff -u -r1.179 -r1.180
  --- CHANGES	2001/04/20 16:43:31	1.179
  +++ CHANGES	2001/04/20 17:59:01	1.180
  @@ -1,4 +1,12 @@
   Changes with Apache 2.0.18-dev
  +  *) Fix seg fault at start-up introduced by Ryan's change to enable
  +     modules to specify their own logging tags. mod_log_config
  +     registers an optional function, ap_register_log_handler().
  +     ap_register_log_handler() was being called by http_core before
  +     the directive hash table was created. This patch creates the
  +     directive hash table before ap_register_log_handler() is
  +     registered as an optional function.
  +     [jean-frederic clere <jfrederic.clere@fujitsu-siemens.com>]
   
     *) Add ap_set_int_slot() function
        [John K. Sterling <sterling@covalent.net>]
  
  
  
  1.55      +7 -1      httpd-2.0/modules/loggers/mod_log_config.c
  
  Index: mod_log_config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/loggers/mod_log_config.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- mod_log_config.c	2001/04/18 21:06:07	1.54
  +++ mod_log_config.c	2001/04/20 17:59:05	1.55
  @@ -1155,7 +1155,6 @@
   {
       static APR_OPTIONAL_FN_TYPE(ap_register_log_handler) *log_pfn_register;
   
  -    log_hash = apr_hash_make(p);
       log_pfn_register = APR_RETRIEVE_OPTIONAL_FN(ap_register_log_handler);
   
       if (log_pfn_register) {
  @@ -1195,6 +1194,13 @@
       ap_hook_open_logs(init_config_log,NULL,NULL,APR_HOOK_MIDDLE);
       ap_hook_log_transaction(multi_log_transaction,NULL,NULL,APR_HOOK_MIDDLE);
   
  +    /* Init log_hash before we register the optional function. It is 
  +     * possible for the optional function, ap_register_log_handler,
  +     * to be called before any other mod_log_config hooks are called.
  +     * As a policy, we should init everything required by an optional function
  +     * before calling APR_REGISTER_OPTIONAL_FN.
  +     */ 
  +    log_hash = apr_hash_make(p);
       APR_REGISTER_OPTIONAL_FN(ap_register_log_handler);
   }
   
  
  
  

Mime
View raw message