]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: session: add a pointer to a struct task in the session
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Aug 2017 17:02:51 +0000 (19:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Aug 2017 05:05:49 +0000 (07:05 +0200)
commit0b74eae1f1bd54c00c4b799044ef67febdbd79a5
treec03771e74485f02173573d3ff93151662324c2f8
parentca3610251b3903c8db4f6d79a5d064dbe0d04962
MEDIUM: session: add a pointer to a struct task in the session

The session may need to enforce a timeout when waiting for a handshake.
Till now we used a trick to avoid allocating a pointer, we used to set
the connection's owner to the task and set the task's context to the
session, so that it was possible to circle between all of them. The
problem is that we'll really need to pass the pointer to the session
to the upper layers during initialization and that the only place to
store it is conn->owner, which is squatted for this trick.

So this patch moves the struct task* into the session where it should
always have been and ensures conn->owner points to the session until
the data layer is properly initialized.
include/types/connection.h
include/types/session.h
src/session.c