summaryrefslogtreecommitdiff
path: root/modules/proxy/mod_proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/proxy/mod_proxy.c')
-rw-r--r--modules/proxy/mod_proxy.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 70d6b77773..5a562c5623 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -1151,13 +1151,11 @@ static const char *
}
}
else {
- int adding = 0;
proxy_worker *worker = ap_proxy_get_worker(cmd->temp_pool, conf, r);
if (!worker) {
const char *err = ap_proxy_add_worker(&worker, cmd->pool, conf, r);
if (err)
return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
- adding = 1;
} else {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
"worker %s already used by another worker", worker->name);
@@ -1170,10 +1168,6 @@ static const char *
if (err)
return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
}
-
- /* XXX: ProxyPass is not a good name look for Location? */
- if (adding)
- proxy_checkstorage_add_entry(worker, "ProxyPass");
}
return NULL;
}
@@ -1523,7 +1517,6 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
const apr_array_header_t *arr;
const apr_table_entry_t *elts;
int i;
- int adding = 0;
if (cmd->path)
path = apr_pstrdup(cmd->pool, cmd->path);
@@ -1559,7 +1552,6 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
const char *err;
if ((err = ap_proxy_add_worker(&worker, cmd->pool, conf, name)) != NULL)
return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
- adding = 1;
} else {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
"worker %s already used by another worker", worker->name);
@@ -1585,9 +1577,6 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
}
/* Add the worker to the load balancer */
ap_proxy_add_worker_to_balancer(cmd->pool, balancer, worker);
- /* XXX: Holy cow: The worker can belong to more that one balancer! */
- if (adding)
- proxy_checkstorage_add_entry(worker, balancer->name);
return NULL;
}
@@ -1869,6 +1858,9 @@ static int proxy_post_config(apr_pool_t *pconf, apr_pool_t *plog,
/* if we have a memory provider create the comarea here */
proxy_create_comarea(pconf);
+ /* Also fill the comarea of the health-checker */
+ proxy_checkstorage_add_workers(pconf, s);
+
return OK;
}