unsigned int scolonsep:1; /* true if ';' seps sticky session paths */
unsigned int max_attempts_set:1;
unsigned int was_malloced:1;
+ unsigned int need_reset:1;
} proxy_balancer_shared;
#define ALIGNED_PROXY_BALANCER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_balancer_shared)))
}
if ((val = apr_table_get(params, "w_status_D"))) {
ap_proxy_set_wstatus('D', atoi(val), wsel);
+ /* if enabling, we need to reset all lb params */
+ if (bsel && !(atoi(val))) {
+ bsel->s->need_reset = 1;
+ }
}
if ((val = apr_table_get(params, "w_status_H"))) {
ap_proxy_set_wstatus('H', atoi(val), wsel);
int ival;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "settings balancer params");
if ((val = apr_table_get(params, "b_lbm"))) {
- if (strlen(val) < (sizeof(bsel->s->lbpname)-1)) {
+ if ((strlen(val) < (sizeof(bsel->s->lbpname)-1)) &&
+ strcmp(val, bsel->s->lbpname)) {
proxy_balancer_method *lbmethod;
- lbmethod = ap_lookup_provider(PROXY_LBMETHOD, bsel->s->lbpname, "0");
+ lbmethod = ap_lookup_provider(PROXY_LBMETHOD, val, "0");
if (lbmethod) {
PROXY_STRNCPY(bsel->s->lbpname, val);
bsel->lbmethod = lbmethod;
bsel->s->wupdated = apr_time_now();
+ bsel->s->need_reset = 1;
}
}
}