MCPcopy Create free account
hub / github.com/apache/httpd / recalc_factors

Function recalc_factors

modules/proxy/mod_proxy_balancer.c:709–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709static void recalc_factors(proxy_balancer *balancer)
710{
711 int i;
712 proxy_worker **workers;
713
714
715 /* Recalculate lbfactors */
716 workers = (proxy_worker **)balancer->workers->elts;
717 /* Special case if there is only one worker its
718 * load factor will always be 100
719 */
720 if (balancer->workers->nelts == 1) {
721 (*workers)->s->lbstatus = (*workers)->s->lbfactor = 100;
722 return;
723 }
724 for (i = 0; i < balancer->workers->nelts; i++) {
725 /* Update the status entries */
726 workers[i]->s->lbstatus = workers[i]->s->lbfactor;
727 }
728}
729
730static apr_status_t lock_remove(void *data)
731{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected