Skip to content

Commit cee4c74

Browse files
committed
Use only one slotmem for status and checker.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-proxy-scoreboard@428437 13f79535-47bb-0310-9956-ffa450edef68
1 parent 98ea03e commit cee4c74

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

modules/proxy/mod_proxy_health_checker.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,19 @@ static int healthck_post_config(apr_pool_t *pconf, apr_pool_t *plog,
4040
{
4141
const health_worker_method *worker_storage;
4242
worker_storage = ap_lookup_provider(PROXY_CKMETHOD, "default", "0");
43+
proxy_server_conf *sconf = ap_get_module_config(s->module_config,
44+
&proxy_module);
45+
char *slotmem_loc = sconf->slotmem_loc;
4346

4447
if (worker_storage) {
4548
apr_status_t rv;
46-
rv = worker_storage->create_slotmem("proxy/checker", ap_proxy_lb_workers(), pconf);
49+
if (!slotmem_loc)
50+
slotmem_loc = apr_pstrcat(pconf, ":", proxy_module.name, NULL);
51+
52+
rv = worker_storage->create_slotmem(slotmem_loc, ap_proxy_lb_workers(), pconf);
4753
if (rv != APR_SUCCESS) {
4854
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
49-
"proxy: BALANCER: The health checker can't create slotmem");
55+
"proxy: HEALTHCHECK: The health checker can't create slotmem");
5056
return APR_EGENERAL;
5157
}
5258

0 commit comments

Comments
 (0)