summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2008-12-05 09:16:20 +0000
committerPaul Querna <pquerna@apache.org>2008-12-05 09:16:20 +0000
commitc283a61afb528174c29d8d62655206244f4b481e (patch)
tree50dc953343cfa37aaf758172549e7ac6a7bc619a
parentd9370018b82dd7397488b10fca42f7eabd7f2d31 (diff)
downloadhttpd-c283a61afb528174c29d8d62655206244f4b481e.tar.gz
Print the correct enum value for the lock mech.
Suggested by: Ruediger Pluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723677 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/cluster/mod_heartmonitor.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c
index 8097adc371..130e55ae86 100644
--- a/modules/cluster/mod_heartmonitor.c
+++ b/modules/cluster/mod_heartmonitor.c
@@ -443,6 +443,7 @@ static void hm_child_init(apr_pool_t *p, server_rec *s)
static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s)
{
+ apr_lockmech_e mech;
apr_status_t rv;
hm_ctx_t *ctx = ap_get_module_config(s->module_config,
&heartmonitor_module);
@@ -452,25 +453,26 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
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,
"Heartmonitor: Failed to create listener "
- "mutex at %s (type=%s)", ctx->mutex_path,
- apr_proc_mutex_defname());
+ "mutex at %s (type=%d)", ctx->mutex_path,
+ mech);
return !OK;
}