Loading modules/cluster/mod_heartbeat.c +15 −10 Original line number Diff line number Diff line Loading @@ -211,11 +211,11 @@ static void hb_child_init(apr_pool_t *p, server_rec *s) { hb_ctx_t *ctx = ap_get_module_config(s->module_config, &heartbeat_module); if (ctx->active) { apr_proc_mutex_child_init(&ctx->mutex, ctx->mutex_path, p); ctx->status = -1; if (ctx->active) { start_hb_worker(p, ctx); if (ctx->status != 0) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, Loading @@ -236,6 +236,10 @@ static int hb_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &ctx->thread_limit); ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &ctx->server_limit); if (!ctx->active) { return OK; } rv = apr_proc_mutex_create(&ctx->mutex, ctx->mutex_path, #if APR_HAS_FCNTL_SERIALIZE APR_LOCK_FCNTL, Loading Loading @@ -266,11 +270,7 @@ static void hb_register_hooks(apr_pool_t *p) static void *hb_create_config(apr_pool_t *p, server_rec *s) { hb_ctx_t *cfg = (hb_ctx_t *) apr_palloc(p, sizeof(hb_ctx_t)); cfg->active = 0; cfg->thread_limit = 0; cfg->server_limit = 0; hb_ctx_t *cfg = (hb_ctx_t *) apr_pcalloc(p, sizeof(hb_ctx_t)); return cfg; } Loading @@ -294,7 +294,12 @@ static const char *cmd_hb_address(cmd_parms *cmd, return err; } if (!ctx->active) { ctx->active = 1; } else { return "HeartbeatAddress: May only be specified once."; } rv = apr_parse_addr_port(&host_str, &scope_id, &port, addr, p); Loading Loading
modules/cluster/mod_heartbeat.c +15 −10 Original line number Diff line number Diff line Loading @@ -211,11 +211,11 @@ static void hb_child_init(apr_pool_t *p, server_rec *s) { hb_ctx_t *ctx = ap_get_module_config(s->module_config, &heartbeat_module); if (ctx->active) { apr_proc_mutex_child_init(&ctx->mutex, ctx->mutex_path, p); ctx->status = -1; if (ctx->active) { start_hb_worker(p, ctx); if (ctx->status != 0) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, Loading @@ -236,6 +236,10 @@ static int hb_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &ctx->thread_limit); ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &ctx->server_limit); if (!ctx->active) { return OK; } rv = apr_proc_mutex_create(&ctx->mutex, ctx->mutex_path, #if APR_HAS_FCNTL_SERIALIZE APR_LOCK_FCNTL, Loading Loading @@ -266,11 +270,7 @@ static void hb_register_hooks(apr_pool_t *p) static void *hb_create_config(apr_pool_t *p, server_rec *s) { hb_ctx_t *cfg = (hb_ctx_t *) apr_palloc(p, sizeof(hb_ctx_t)); cfg->active = 0; cfg->thread_limit = 0; cfg->server_limit = 0; hb_ctx_t *cfg = (hb_ctx_t *) apr_pcalloc(p, sizeof(hb_ctx_t)); return cfg; } Loading @@ -294,7 +294,12 @@ static const char *cmd_hb_address(cmd_parms *cmd, return err; } if (!ctx->active) { ctx->active = 1; } else { return "HeartbeatAddress: May only be specified once."; } rv = apr_parse_addr_port(&host_str, &scope_id, &port, addr, p); Loading