summaryrefslogtreecommitdiff
path: root/modules/proxy/mod_proxy_balancer.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2012-02-16 02:47:54 +0100
committerStefan Fritsch <sf@sfritsch.de>2012-02-16 02:47:54 +0100
commit212cb6c2dcb419aaa6c848406136ec05e98c8632 (patch)
tree3c6f8cc25cde8781809bfeb92ebcadac341b1af4 /modules/proxy/mod_proxy_balancer.c
parente072a2dd866b7cb9f14319b80326a4e7fd16fcdf (diff)
downloadapache2-212cb6c2dcb419aaa6c848406136ec05e98c8632.tar.gz
Import upstream release candidate 2.4.1upstream/2.4.1
Diffstat (limited to 'modules/proxy/mod_proxy_balancer.c')
-rw-r--r--modules/proxy/mod_proxy_balancer.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c
index eb15f087..08417d65 100644
--- a/modules/proxy/mod_proxy_balancer.c
+++ b/modules/proxy/mod_proxy_balancer.c
@@ -217,7 +217,7 @@ static proxy_worker *find_route_worker(proxy_balancer *balancer,
if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(worker) : PROXY_WORKER_IS_STANDBY(worker)) )
continue;
if (*(worker->s->route) && strcmp(worker->s->route, route) == 0) {
- if (worker && PROXY_WORKER_IS_USABLE(worker)) {
+ if (PROXY_WORKER_IS_USABLE(worker)) {
return worker;
} else {
/*
@@ -693,7 +693,7 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
{
apr_status_t rv;
void *sconf = s->module_config;
- proxy_server_conf *conf = (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
+ proxy_server_conf *conf;
ap_slotmem_instance_t *new = NULL;
apr_time_t tstamp;
@@ -737,6 +737,13 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
sconf = s->module_config;
conf = (proxy_server_conf *)ap_get_module_config(sconf, &proxy_module);
+ if (conf->bslot) {
+ /* Shared memory already created for this proxy_server_conf.
+ */
+ s = s->next;
+ continue;
+ }
+
if (conf->balancers->nelts) {
conf->max_balancers = conf->balancers->nelts + conf->bgrowth;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01178) "Doing balancers create: %d, %d (%d)",
@@ -877,9 +884,9 @@ static void push2table(const char *input, apr_table_t *params,
apr_table_set(params, key, val);
}
else {
- const char *ok = *allowed;
- while (ok) {
- if (strcmp(ok, key) == 0) {
+ const char **ok = allowed;
+ while (*ok) {
+ if (strcmp(*ok, key) == 0) {
apr_table_set(params, key, val);
break;
}