summaryrefslogtreecommitdiffstats
path: root/modules/proxy/mod_proxy_balancer.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-01-31 15:25:53 +0100
committerYann Ylavic <ylavic@apache.org>2018-01-31 15:25:53 +0100
commit37578399efe6cc63b1a951daf5150ba5778a00b5 (patch)
treee511f809f6e4ac7b5bd031b90cd48c8239d7f4f9 /modules/proxy/mod_proxy_balancer.c
parentmod_proxy_balancer: follow up tp r1822509 and r1822800. (diff)
downloadapache2-37578399efe6cc63b1a951daf5150ba5778a00b5.tar.xz
apache2-37578399efe6cc63b1a951daf5150ba5778a00b5.zip
Revert r1822800 and r1822804.
All was already there, I just misread name vs sname :/ git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822806 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/mod_proxy_balancer.c')
-rw-r--r--modules/proxy/mod_proxy_balancer.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c
index 9bd4330b51..bdefc8f54e 100644
--- a/modules/proxy/mod_proxy_balancer.c
+++ b/modules/proxy/mod_proxy_balancer.c
@@ -792,7 +792,7 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
(s->defn_name ? s->defn_name : "?"),
s->defn_line_number,
(s->error_fname ? s->error_fname : DEFAULT_ERRORLOG));
- conf->id = apr_psprintf(pconf, "balancers_p%x",
+ conf->id = apr_psprintf(pconf, "p%x",
ap_proxy_hashfunc(id, PROXY_HASHFUNC_DEFAULT));
if (conf->bslot) {
/* Shared memory already created for this proxy_server_conf.
@@ -834,7 +834,7 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
/* now that we have the right id, we need to redo the sname field */
ap_pstr2_alnum(pconf, balancer->s->name + sizeof(BALANCER_PREFIX) - 1,
&sname);
- sname = apr_pstrcat(ptemp, conf->id, "_", sname, NULL);
+ sname = apr_pstrcat(pconf, conf->id, "_", sname, NULL);
PROXY_STRNCPY(balancer->s->sname, sname); /* We know this will succeed */
balancer->max_workers = balancer->workers->nelts + balancer->growth;
@@ -876,13 +876,12 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
}
/* create slotmem slots for workers */
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01184)
- "Doing workers create: %s (%s), %d, %d [%u]",
- balancer->s->name, sname,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01184) "Doing workers create: %s (%s), %d, %d [%u]",
+ balancer->s->name, balancer->s->sname,
(int)ALIGNED_PROXY_WORKER_SHARED_SIZE,
(int)balancer->max_workers, i);
- rv = storage->create(&new, sname,
+ rv = storage->create(&new, balancer->s->sname,
ALIGNED_PROXY_WORKER_SHARED_SIZE,
balancer->max_workers, type, pconf);
if (rv != APR_SUCCESS) {