From 9e567f96decb252ec16703a9a356b464ad0c00bf Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Wed, 27 Jun 2007 08:42:02 +0000 Subject: [PATCH] Remove the balancer modification logic of balancer-manager because it can't work. And add the sticky_path to the sticky display. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551099 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy.c | 3 +- modules/proxy/mod_proxy_balancer.c | 73 +++--------------------------- 2 files changed, 8 insertions(+), 68 deletions(-) diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 07110200a7..92b00d95b4 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -2068,7 +2068,8 @@ static int proxy_status_hook(request_rec *r, int flags) ap_rputs("\n\n" "" "\n", r); - ap_rvputs(r, "", apr_time_sec(balancer->timeout)); ap_rprintf(r, "\n", diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index c3f9605c6a..6e56a743f1 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -649,33 +649,10 @@ static int balancer_handler(request_rec *r) } } /* First set the params */ - if (bsel) { - const char *val; - if ((val = apr_table_get(params, "ss"))) { - if (strlen(val)) - bsel->sticky = apr_pstrdup(conf->pool, val); - else - bsel->sticky = NULL; - } - if ((val = apr_table_get(params, "tm"))) { - int ival = atoi(val); - if (ival >= 0) - bsel->timeout = apr_time_from_sec(ival); - } - if ((val = apr_table_get(params, "fa"))) { - int ival = atoi(val); - if (ival >= 0) - bsel->max_attempts = ival; - bsel->max_attempts_set = 1; - } - if ((val = apr_table_get(params, "lm"))) { - proxy_balancer_method *provider; - provider = ap_lookup_provider(PROXY_LBMETHOD, val, "0"); - if (provider) { - bsel->lbmethod = provider; - } - } - } + /* + * Note that it is not possible set the proxy_balancer because it is not + * in shared memory. + */ if (wsel) { const char *val; if ((val = apr_table_get(params, "lf"))) { @@ -755,14 +732,11 @@ static int balancer_handler(request_rec *r) for (i = 0; i < conf->balancers->nelts; i++) { ap_rputs("
\n

LoadBalancer Status for ", r); - ap_rvputs(r, "uri, "?b=", - balancer->name + sizeof("balancer://") - 1, - "\">", NULL); - ap_rvputs(r, balancer->name, "

\n\n", NULL); + ap_rvputs(r, balancer->name, "\n\n", NULL); ap_rputs("\n\n
SSesTimeoutMethod
", balancer->sticky, NULL); + ap_rvputs(r, "", balancer->sticky, " | ", balancer->sticky_path, + NULL); ap_rprintf(r, "%" APR_TIME_T_FMT "%s
" "" "\n", r); - ap_rvputs(r, "", apr_time_sec(balancer->timeout)); ap_rprintf(r, "\n", balancer->max_attempts); @@ -843,41 +817,6 @@ static int balancer_handler(request_rec *r) "\">\n\n", NULL); ap_rputs("
\n", r); } - else if (bsel) { - ap_rputs("

Edit balancer settings for ", r); - ap_rvputs(r, bsel->name, "

\n", NULL); - ap_rvputs(r, "uri, "\">\n
", NULL); - ap_rputs("
StickySessionTimeoutFailoverAttemptsMethod
", balancer->sticky, NULL); + ap_rvputs(r, "", balancer->sticky, " | ", balancer->sticky_path, NULL); ap_rprintf(r, "%" APR_TIME_T_FMT "%d
\n\n", - apr_time_sec(bsel->timeout)); - ap_rputs("\n", - bsel->max_attempts); - ap_rputs("\n", r); - ap_rputs("\n", r); - ap_rvputs(r, "
StickySession Identifier:sticky) - ap_rvputs(r, "value=\"", bsel->sticky, "\"", NULL); - ap_rputs(">
Timeout:
Failover Attempts:
LB Method:
\nname + sizeof("balancer://") - 1, - "\">\n\n", NULL); - ap_rputs("
\n", r); - } ap_rputs(ap_psignature("",r), r); ap_rputs("\n", r); } -- 2.40.0