Changes with Apache 2.3.7
+ *) Fix startup segfault when the Mutex directive is used but no loaded
+ modules use httpd mutexes. PR 48787. [Jeff Trawick]
+
*) Proxy: get the headers right in a HEAD request with
ProxyErrorOverride, by checking for an overridden error
before not after going into a catch-all code path.
AP_DECLARE_NONSTD(const char *) ap_set_mutex(cmd_parms *cmd, void *dummy,
const char *arg);
+/* private function to initialize Mutex infrastructure */
+AP_DECLARE_NONSTD(void) ap_mutex_init(apr_pool_t *p);
+
/**
* option flags for ap_mutex_register(), ap_global_mutex_create(), and
* ap_proc_mutex_create()
sys_privileges += inc;
return sys_privileges;
}
+
+static int core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
+{
+ ap_mutex_init(pconf);
+ return APR_SUCCESS;
+}
+
static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
{
ap__logio_add_bytes_out = APR_RETRIEVE_OPTIONAL_FN(ap_logio_add_bytes_out);
ap_hook_pre_connection(core_pre_connection, NULL, NULL,
APR_HOOK_REALLY_LAST);
+ ap_hook_pre_config(core_pre_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
ap_hook_post_config(core_post_config,NULL,NULL,APR_HOOK_REALLY_FIRST);
ap_hook_translate_name(ap_core_translate,NULL,NULL,APR_HOOK_REALLY_LAST);
ap_hook_map_to_storage(core_map_to_storage,NULL,NULL,APR_HOOK_REALLY_LAST);
return APR_SUCCESS;
}
-static void mx_hash_init(apr_pool_t *p)
+AP_DECLARE_NONSTD(void) ap_mutex_init(apr_pool_t *p)
{
mutex_cfg_t *def;
return APR_EINVAL;
}
- mx_hash_init(pconf);
+ ap_mutex_init(pconf); /* in case this mod's pre-config ran before core's */
mxcfg->options = options;
if (options & AP_MUTEX_DEFAULT_NONE) {