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

Function init_balancer_members

modules/proxy/mod_proxy_balancer.c:106–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106static void init_balancer_members(apr_pool_t *p, server_rec *s,
107 proxy_balancer *balancer)
108{
109 int i;
110 proxy_worker **workers;
111
112 workers = (proxy_worker **)balancer->workers->elts;
113
114 for (i = 0; i < balancer->workers->nelts; i++) {
115 int worker_is_initialized;
116 proxy_worker *worker = *workers;
117 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01158)
118 "Looking at %s -> %s initialized?", balancer->s->name,
119 ap_proxy_worker_name(p, worker));
120 worker_is_initialized = PROXY_WORKER_IS_INITIALIZED(worker);
121 if (!worker_is_initialized) {
122 ap_proxy_initialize_worker(worker, s, p);
123 }
124 ++workers;
125 }
126
127 /* Set default number of attempts to the number of
128 * workers.
129 */
130 if (!balancer->s->max_attempts_set && balancer->workers->nelts > 1) {
131 balancer->s->max_attempts = balancer->workers->nelts - 1;
132 balancer->s->max_attempts_set = 1;
133 }
134}
135
136/* Retrieve the parameter with the given name
137 * Something like 'JSESSIONID=12345...N'

Callers 1

balancer_child_initFunction · 0.85

Calls 3

ap_proxy_worker_nameFunction · 0.85
ap_log_errorFunction · 0.50

Tested by

no test coverage detected