MINOR: session: remove the list of streams from struct session

Commit bcb86ab ("MINOR: session: add a streams field to the session
struct") added this list of streams that is not needed anymore. Let's
get rid of it now.
This commit is contained in:
Willy Tarreau 2017-10-08 21:32:53 +02:00
parent c939835f77
commit bf08beb2a3
5 changed files with 0 additions and 9 deletions

View File

@ -40,7 +40,6 @@
struct session {
struct proxy *fe; /* the proxy this session depends on for the client side */
struct listener *listener; /* the listener by which the request arrived */
struct list streams; /* list of streams attached to this session */
enum obj_type *origin; /* the connection / applet which initiated this session */
struct timeval accept_date; /* date of the session's accept() in user date */
struct timeval tv_accept; /* date of the session's accept() in internal date (monotonic) */

View File

@ -133,7 +133,6 @@ struct stream {
* This is a bit field of TASK_WOKEN_* */
struct list list; /* position in global streams list */
struct list by_sess; /* position in the session's streams list */
struct list by_srv; /* position in server stream list */
struct list back_refs; /* list of users tracking this stream */
struct buffer_wait buffer_wait; /* position in the list of objects waiting for a buffer */

View File

@ -1841,7 +1841,6 @@ static struct appctx *peer_session_create(struct peers *peers, struct peer *peer
/* Error unrolling */
out_free_strm:
LIST_DEL(&s->by_sess);
LIST_DEL(&s->list);
pool_free2(pool2_stream, s);
out_free_sess:

View File

@ -46,7 +46,6 @@ struct session *session_new(struct proxy *fe, struct listener *li, enum obj_type
if (sess) {
sess->listener = li;
sess->fe = fe;
LIST_INIT(&sess->streams);
sess->origin = origin;
sess->accept_date = date; /* user-visible date for logging */
sess->tv_accept = now; /* corrected date for internal use */
@ -66,8 +65,6 @@ struct session *session_new(struct proxy *fe, struct listener *li, enum obj_type
void session_free(struct session *sess)
{
if (!LIST_ISEMPTY(&sess->streams))
return;
sess->fe->feconn--;
session_store_counters(sess);
vars_prune_per_sess(&sess->vars);

View File

@ -154,7 +154,6 @@ struct stream *stream_new(struct session *sess, enum obj_type *origin)
/* OK, we're keeping the stream, so let's properly initialize the stream */
LIST_ADDQ(&streams, &s->list);
LIST_ADDQ(&sess->streams, &s->by_sess);
LIST_INIT(&s->back_refs);
LIST_INIT(&s->buffer_wait.list);
@ -276,7 +275,6 @@ struct stream *stream_new(struct session *sess, enum obj_type *origin)
flt_stream_release(s, 0);
task_free(t);
out_fail_alloc:
LIST_DEL(&s->by_sess);
LIST_DEL(&s->list);
pool_free2(pool2_stream, s);
return NULL;
@ -376,7 +374,6 @@ static void stream_free(struct stream *s)
LIST_ADDQ(&LIST_ELEM(s->list.n, struct stream *, list)->back_refs, &bref->users);
bref->ref = s->list.n;
}
LIST_DEL(&s->by_sess);
LIST_DEL(&s->list);
si_release_endpoint(&s->si[1]);
si_release_endpoint(&s->si[0]);