]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: connection: get rid of data->init() which was not for data
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Aug 2017 13:46:01 +0000 (15:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Aug 2017 05:04:04 +0000 (07:04 +0200)
commit8e3c6ce75a4f4b61e01ddb72d278ad447dbc1ae7
tree4f0a84e4c1343ce10380783b071e8e49edd77e7b
parent8ff5a8d87fa99f3e9bbc2b7d68f922fcc0fedd31
MEDIUM: connection: get rid of data->init() which was not for data

The ->init() callback of the connection's data layer was only used to
complete the session's initialisation since sessions and streams were
split apart in 1.6. The problem is that it creates a big confusion in
the layers' roles as the session has to register a dummy data layer
when waiting for a handshake to complete, then hand it off to the
stream which will replace it.

The real need is to notify that the transport has finished initializing.
This should enable a better splitting between these layers.

This patch thus introduces a connection-specific callback called
xprt_done_cb() which informs about handshake successes or failures. With
this, data->init() can disappear, CO_FL_INIT_DATA as well, and we don't
need to register a dummy data->wake() callback to be notified of errors.
contrib/debug/flags.c
include/proto/connection.h
include/types/connection.h
src/connection.c
src/session.c