[MAJOR] reworked ->be, ->fe and ->fi in sessions

There was a confusion about the way to find filters and backend
parameters from sessions. The chaining has been changed between
the session and the proxy.

Now, a session knows only two proxies : one frontend (->fe) and
one backend (->be). Each proxy has a link to the proxy providing
filters and to the proxy providing backend parameters (both self
by default).

The captures (cookies and headers) have been attached to the
frontend's filters for now.

The uri_auth and the statistics are attached to the backend's
filters so that the uri can depend on a hostname for instance.
This commit is contained in:
Willy Tarreau
2006-12-17 19:31:23 +01:00
parent 97a738f32c
commit 830ff458de
9 changed files with 221 additions and 223 deletions

View File

@@ -104,13 +104,13 @@ struct pendconn *pendconn_add(struct session *sess)
if (sess->srv->nbpend > sess->srv->nbpend_max)
sess->srv->nbpend_max = sess->srv->nbpend;
} else {
LIST_ADDQ(&sess->be->pendconns, &p->list);
sess->logs.prx_queue_size += sess->be->nbpend;
sess->be->nbpend++;
if (sess->be->nbpend > sess->be->nbpend_max)
sess->be->nbpend_max = sess->be->nbpend;
LIST_ADDQ(&sess->be->beprm->pendconns, &p->list);
sess->logs.prx_queue_size += sess->be->beprm->nbpend;
sess->be->beprm->nbpend++;
if (sess->be->beprm->nbpend > sess->be->beprm->nbpend_max)
sess->be->beprm->nbpend_max = sess->be->beprm->nbpend;
}
sess->be->totpend++;
sess->be->beprm->totpend++;
return p;
}
@@ -126,8 +126,8 @@ void pendconn_free(struct pendconn *p)
if (p->srv)
p->srv->nbpend--;
else
p->sess->be->nbpend--;
p->sess->be->totpend--;
p->sess->be->beprm->nbpend--;
p->sess->be->beprm->totpend--;
pool_free(pendconn, p);
}