MINOR: connection: Set the conncetion target during its initialisation
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 2 Jul 2020 07:19:54 +0000 (09:19 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 15 Jul 2020 12:08:14 +0000 (14:08 +0200)
commit236c93b10895d0761fedea427bf177a092bd7110
tree14df886ae77a3a7948c15efa9d76629f7d9c6d30
parentfcc3d8a1c082f818c0ceaff9fc8aeef27126faae
MINOR: connection: Set the conncetion target during its initialisation

When a new connection is created, its target is always set just after. So the
connection target may set when it is created instead, during its initialisation
to be precise. It is the purpose of this patch. Now, conn_new() function is
called with the connection target as parameter. The target is then passed to
conn_init(). It means the target must be passed when cs_new() is called. In this
case, the target is only used when the conn-stream is created with no
connection. This only happens for tcpchecks for now.
include/haproxy/connection.h
include/haproxy/stream_interface.h
src/backend.c
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c
src/session.c
src/tcpcheck.c