Commit 74b8e489 authored by Paul Querna's avatar Paul Querna
Browse files

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
parent c3c69b6b
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -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;
    }

    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);