Changeset 1539

Show
Ignore:
Timestamp:
01/28/2007 02:34:41 PM (21 months ago)
Author:
jan
Message:

added static balancer ( submitted by uwe.voelker@… )

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/mod_proxy_core.c

    r1531 r1539  
    7474        array_insert_int(p->possible_balancers, "carp", PROXY_BALANCE_CARP); 
    7575        array_insert_int(p->possible_balancers, "round-robin", PROXY_BALANCE_RR); 
     76        array_insert_int(p->possible_balancers, "static", PROXY_BALANCE_STATIC); 
    7677 
    7778        p->proxy_register_protocol = mod_proxy_core_register_protocol; 
     
    14811482                                address = cur_address; 
    14821483                        } 
     1484                } 
     1485 
     1486                break; 
     1487        case PROXY_BALANCE_STATIC: 
     1488                /* static (only fail-over) */ 
     1489 
     1490                for (i = 0; i < address_pool->used; i++) { 
     1491                        cur_address = address_pool->ptr[i]; 
     1492 
     1493                        if (cur_address->state != PROXY_ADDRESS_STATE_ACTIVE) continue; 
     1494 
     1495                        address = cur_address; 
     1496                        break; 
    14831497                } 
    14841498 
  • trunk/src/mod_proxy_core_backend.h

    r1496 r1539  
    2929        PROXY_BALANCE_SQF, 
    3030        PROXY_BALANCE_CARP, 
    31         PROXY_BALANCE_RR 
     31        PROXY_BALANCE_RR, 
     32        PROXY_BALANCE_STATIC 
    3233} proxy_balance_t; 
    3334