#define PROXY_BALANCER_UNLOCK(b) APR_SUCCESS
#endif
+
/* Retrieve the parameter with the given name */
static char *get_path_param(apr_pool_t *pool, char *url,
const char *name)
* This is for cases when worker is in error state.
* It will force the even request distribution
*/
- total_factor += worker->lbfactor;
+ total_factor += worker->s->lbfactor;
}
worker++;
}
* Lbstatus is of higher importance then
* the number of empty slots.
*/
- if (worker->lbstatus > candidate->lbstatus) {
+ if (worker->s->lbstatus > candidate->s->lbstatus) {
candidate = worker;
}
}
/* XXX: The lbfactor can be update using bytes transfered
* Right now, use the round-robin scheme
*/
- worker->lbstatus += worker->lbfactor;
- if (worker->lbstatus >= total_factor)
- worker->lbstatus = worker->lbfactor;
+ worker->s->lbstatus += worker->s->lbfactor;
+ if (worker->s->lbstatus >= total_factor)
+ worker->s->lbstatus = worker->s->lbfactor;
}
worker++;
}
workers = (proxy_runtime_worker *)(*balancer)->workers->elts;
for (i = 0; i < (*balancer)->workers->nelts; i++) {
/* For now assume that all workers are OK */
- workers->lbstatus += workers->lbfactor;
- if (workers->lbstatus >= 100.0)
- workers->lbstatus = workers->lbfactor;
+ workers->s->lbstatus += workers->s->lbfactor;
+ if (workers->s->lbstatus >= 100.0)
+ workers->s->lbstatus = workers->s->lbfactor;
workers++;
}
}