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>]
{
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) {
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);
}