| 707 | } |
| 708 | |
| 709 | static 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 | |
| 730 | static apr_status_t lock_remove(void *data) |
| 731 | { |
no outgoing calls
no test coverage detected