From: Willy Tarreau Date: Tue, 27 Jun 2017 13:13:43 +0000 (+0200) Subject: MINOR: session: add a streams field to the session struct X-Git-Tag: v1.8-dev3~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcb86ab;p=thirdparty%2Fhaproxy.git MINOR: session: add a streams field to the session struct This will be used to hold the list of streams belonging to a given session. --- diff --git a/include/types/session.h b/include/types/session.h index 62c3a95fe0..35a17e1917 100644 --- a/include/types/session.h +++ b/include/types/session.h @@ -40,6 +40,7 @@ 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) */ diff --git a/src/session.c b/src/session.c index 429577716b..a226559da2 100644 --- a/src/session.c +++ b/src/session.c @@ -56,6 +56,7 @@ 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 */