diff options
author | Paul Querna <pquerna@apache.org> | 2008-12-02 08:10:49 +0000 |
---|---|---|
committer | Paul Querna <pquerna@apache.org> | 2008-12-02 08:10:49 +0000 |
commit | a9748efa3fcd9a1cd2036116c69326ea4cf97c22 (patch) | |
tree | 1965e51dc015363168dfcc9566fb826bd8beaf5a | |
parent | a5641174110c926b7abfd465eb434072c1951aeb (diff) | |
download | httpd-a9748efa3fcd9a1cd2036116c69326ea4cf97c22.tar.gz |
When not configured, don't do anything by default.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722397 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | modules/cluster/mod_heartmonitor.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c index 5e5b562b9b..e98b505ec3 100644 --- a/modules/cluster/mod_heartmonitor.c +++ b/modules/cluster/mod_heartmonitor.c @@ -407,6 +407,10 @@ static void hm_child_init(apr_pool_t *p, server_rec *s) hm_ctx_t *ctx = ap_get_module_config(s->module_config, &heartmonitor_module); + if (!ctx->active) { + return; + } + apr_proc_mutex_child_init(&ctx->mutex, ctx->mutex_path, p); ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, @@ -429,10 +433,16 @@ 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_status_t rv; hm_ctx_t *ctx = ap_get_module_config(s->module_config, &heartmonitor_module); - apr_status_t rv = apr_proc_mutex_create(&ctx->mutex, + + if (!ctx->active) { + return OK; + } + + rv = apr_proc_mutex_create(&ctx->mutex, ctx->mutex_path, #if APR_HAS_FCNTL_SERIALIZE @@ -510,7 +520,12 @@ static const char *cmd_hm_listen(cmd_parms *cmd, return err; } - ctx->active = 1; + if (!ctx->active) { + ctx->active = 1; + } + else { + return "HeartbeatListen: May only be specified once."; + } rv = apr_parse_addr_port(&host_str, &scope_id, &port, mcast_addr, p); |