static int hb_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
server_rec *s)
{
+ apr_lockmech_e mech;
apr_status_t rv;
hb_ctx_t *ctx = ap_get_module_config(s->module_config, &heartbeat_module);
return OK;
}
- rv = apr_proc_mutex_create(&ctx->mutex, ctx->mutex_path,
#if APR_HAS_FCNTL_SERIALIZE
- APR_LOCK_FCNTL,
+ mech = APR_LOCK_FCNTL;
#else
#if APR_HAS_FLOCK_SERIALIZE
- APR_LOCK_FLOCK,
+ mech = APR_LOCK_FLOCK;
#else
#error port me to a non crap platform.
#endif
#endif
+
+ rv = apr_proc_mutex_create(&ctx->mutex, ctx->mutex_path,
+ mech,
p);
if (rv) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
- "Heartbeat: mutex failed creation at %s (type=%s)",
- ctx->mutex_path, apr_proc_mutex_defname());
+ "Heartbeat: mutex failed creation at %s (type=%d)",
+ ctx->mutex_path, mech);
return !OK;
}