Loading modules/proxy/examples/mod_lbmethod_rr.c +11 −1 Original line number Diff line number Diff line Loading @@ -95,11 +95,21 @@ static proxy_worker *find_best_roundrobin(proxy_balancer *balancer, return mycandidate; } static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static const proxy_balancer_method roundrobin = { "roundrobin", &find_best_roundrobin, NULL NULL, &reset, &age }; Loading modules/proxy/mod_lbmethod_bybusyness.c +4 −4 Original line number Diff line number Diff line Loading @@ -103,11 +103,11 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer, } static apr_status_t reset(proxy_balancer *balancer, request_rec *r) { static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, request_rec *r) { static apr_status_t age(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } Loading @@ -115,7 +115,7 @@ const proxy_balancer_method proxy_balancer_bybusyness = { "bybusyness", &find_best_bybusyness, NULL, &reset, &age, NULL &age }; modules/proxy/mod_lbmethod_byrequests.c +4 −4 Original line number Diff line number Diff line Loading @@ -130,11 +130,11 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer, return mycandidate; } static apr_status_t reset(proxy_balancer *balancer, request_rec *r) { static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, request_rec *r) { static apr_status_t age(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } Loading @@ -148,7 +148,7 @@ const proxy_balancer_method proxy_balancer_byrequests = { "byrequests", &find_best_byrequests, NULL, &reset, &age, NULL &age }; modules/proxy/mod_lbmethod_bytraffic.c +4 −4 Original line number Diff line number Diff line Loading @@ -103,11 +103,11 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer, return mycandidate; } static apr_status_t reset(proxy_balancer *balancer, request_rec *r) { static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, request_rec *r) { static apr_status_t age(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } Loading @@ -115,7 +115,7 @@ const proxy_balancer_method proxy_balancer_bytraffic = { "bytraffic", &find_best_bytraffic, NULL, &reset, &age, NULL &age }; modules/proxy/mod_proxy.c +10 −3 Original line number Diff line number Diff line Loading @@ -933,6 +933,13 @@ static int proxy_handler(request_rec *r) balancer = NULL; goto cleanup; } /* Initialise worker if needed, note the shared area must be initialized by the balancer logic */ if (balancer) { ap_proxy_initialize_worker(worker, r->server, conf->pool); ap_proxy_initialize_worker_share(conf, worker, r->server); } if (balancer && balancer->max_attempts_set && !max_attempts) max_attempts = balancer->max_attempts; /* firstly, try a proxy, unless a NoProxy directive is active */ Loading Loading @@ -2286,7 +2293,7 @@ static void child_init(apr_pool_t *p, server_rec *s) worker = (proxy_worker *)conf->workers->elts; for (i = 0; i < conf->workers->nelts; i++) { ap_proxy_initialize_worker_share(conf, worker, s); ap_proxy_initialize_worker(worker, s); ap_proxy_initialize_worker(worker, s, p); worker++; } /* Create and initialize forward worker if defined */ Loading @@ -2296,7 +2303,7 @@ static void child_init(apr_pool_t *p, server_rec *s) conf->forward->hostname = "*"; conf->forward->scheme = "*"; ap_proxy_initialize_worker_share(conf, conf->forward, s); ap_proxy_initialize_worker(conf->forward, s); ap_proxy_initialize_worker(conf->forward, s, p); /* Do not disable worker in case of errors */ conf->forward->s->status |= PROXY_WORKER_IGNORE_ERRORS; /* Disable address cache for generic forward worker */ Loading @@ -2308,7 +2315,7 @@ static void child_init(apr_pool_t *p, server_rec *s) reverse->hostname = "*"; reverse->scheme = "*"; ap_proxy_initialize_worker_share(conf, reverse, s); ap_proxy_initialize_worker(reverse, s); ap_proxy_initialize_worker(reverse, s, p); /* Do not disable worker in case of errors */ reverse->s->status |= PROXY_WORKER_IGNORE_ERRORS; /* Disable address cache for generic reverse worker */ Loading Loading
modules/proxy/examples/mod_lbmethod_rr.c +11 −1 Original line number Diff line number Diff line Loading @@ -95,11 +95,21 @@ static proxy_worker *find_best_roundrobin(proxy_balancer *balancer, return mycandidate; } static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static const proxy_balancer_method roundrobin = { "roundrobin", &find_best_roundrobin, NULL NULL, &reset, &age }; Loading
modules/proxy/mod_lbmethod_bybusyness.c +4 −4 Original line number Diff line number Diff line Loading @@ -103,11 +103,11 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer, } static apr_status_t reset(proxy_balancer *balancer, request_rec *r) { static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, request_rec *r) { static apr_status_t age(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } Loading @@ -115,7 +115,7 @@ const proxy_balancer_method proxy_balancer_bybusyness = { "bybusyness", &find_best_bybusyness, NULL, &reset, &age, NULL &age };
modules/proxy/mod_lbmethod_byrequests.c +4 −4 Original line number Diff line number Diff line Loading @@ -130,11 +130,11 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer, return mycandidate; } static apr_status_t reset(proxy_balancer *balancer, request_rec *r) { static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, request_rec *r) { static apr_status_t age(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } Loading @@ -148,7 +148,7 @@ const proxy_balancer_method proxy_balancer_byrequests = { "byrequests", &find_best_byrequests, NULL, &reset, &age, NULL &age };
modules/proxy/mod_lbmethod_bytraffic.c +4 −4 Original line number Diff line number Diff line Loading @@ -103,11 +103,11 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer, return mycandidate; } static apr_status_t reset(proxy_balancer *balancer, request_rec *r) { static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, request_rec *r) { static apr_status_t age(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } Loading @@ -115,7 +115,7 @@ const proxy_balancer_method proxy_balancer_bytraffic = { "bytraffic", &find_best_bytraffic, NULL, &reset, &age, NULL &age };
modules/proxy/mod_proxy.c +10 −3 Original line number Diff line number Diff line Loading @@ -933,6 +933,13 @@ static int proxy_handler(request_rec *r) balancer = NULL; goto cleanup; } /* Initialise worker if needed, note the shared area must be initialized by the balancer logic */ if (balancer) { ap_proxy_initialize_worker(worker, r->server, conf->pool); ap_proxy_initialize_worker_share(conf, worker, r->server); } if (balancer && balancer->max_attempts_set && !max_attempts) max_attempts = balancer->max_attempts; /* firstly, try a proxy, unless a NoProxy directive is active */ Loading Loading @@ -2286,7 +2293,7 @@ static void child_init(apr_pool_t *p, server_rec *s) worker = (proxy_worker *)conf->workers->elts; for (i = 0; i < conf->workers->nelts; i++) { ap_proxy_initialize_worker_share(conf, worker, s); ap_proxy_initialize_worker(worker, s); ap_proxy_initialize_worker(worker, s, p); worker++; } /* Create and initialize forward worker if defined */ Loading @@ -2296,7 +2303,7 @@ static void child_init(apr_pool_t *p, server_rec *s) conf->forward->hostname = "*"; conf->forward->scheme = "*"; ap_proxy_initialize_worker_share(conf, conf->forward, s); ap_proxy_initialize_worker(conf->forward, s); ap_proxy_initialize_worker(conf->forward, s, p); /* Do not disable worker in case of errors */ conf->forward->s->status |= PROXY_WORKER_IGNORE_ERRORS; /* Disable address cache for generic forward worker */ Loading @@ -2308,7 +2315,7 @@ static void child_init(apr_pool_t *p, server_rec *s) reverse->hostname = "*"; reverse->scheme = "*"; ap_proxy_initialize_worker_share(conf, reverse, s); ap_proxy_initialize_worker(reverse, s); ap_proxy_initialize_worker(reverse, s, p); /* Do not disable worker in case of errors */ reverse->s->status |= PROXY_WORKER_IGNORE_ERRORS; /* Disable address cache for generic reverse worker */ Loading