1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

lb_score is bigger proxy_worker_stat. Prevent wasting space.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574843 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Frederic Clere
2007-09-12 08:34:40 +00:00
parent ce9eaa96e8
commit cb6949285d
4 changed files with 43 additions and 14 deletions

View File

@@ -1670,7 +1670,7 @@ PROXY_DECLARE(void) ap_proxy_initialize_worker_share(proxy_server_conf *conf,
proxy_worker *worker,
server_rec *s)
{
lb_score *score = NULL;
proxy_worker_stat *score = NULL;
if (PROXY_WORKER_IS_INITIALIZED(worker)) {
/* The worker share is already initialized */
@@ -1681,7 +1681,7 @@ PROXY_DECLARE(void) ap_proxy_initialize_worker_share(proxy_server_conf *conf,
}
/* Get scoreboard slot */
if (ap_scoreboard_image) {
score = ap_get_scoreboard_lb(worker->id);
score = (proxy_worker_stat *) ap_get_scoreboard_lb(worker->id);
if (!score) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"proxy: ap_get_scoreboard_lb(%d) failed in child %" APR_PID_T_FMT " for worker %s",
@@ -1694,12 +1694,12 @@ PROXY_DECLARE(void) ap_proxy_initialize_worker_share(proxy_server_conf *conf,
}
}
if (!score) {
score = apr_pcalloc(conf->pool, sizeof(proxy_worker_stat));
score = (proxy_worker_stat *) apr_pcalloc(conf->pool, sizeof(proxy_worker_stat));
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"proxy: initialized plain memory in child %" APR_PID_T_FMT " for worker %s",
getpid(), worker->name);
}
worker->s = (proxy_worker_stat *)score;
worker->s = score;
/*
* recheck to see if we've already been here. Possible
* if proxy is using scoreboard to hold shared stats