]> git.kaiwu.me - haproxy.git/commit
MAJOR: stream-int: stop using si->conn and use si->end instead
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Oct 2013 08:45:07 +0000 (10:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 14:40:22 +0000 (15:40 +0100)
commitb363a1f4699972419c1f21dd8906066eab905878
tree8f9874b38f024eb33cda567c235d216f49887553
parent691b1f429eeefe8e87c2209c1c254d798a35ad68
MAJOR: stream-int: stop using si->conn and use si->end instead

The connection will only remain there as a pre-allocated entity whose
goal is to be placed in ->end when establishing an outgoing connection.
All connection initialization can be made on this connection, but all
information retrieved should be applied to the end point only.

This change is huge because there were many users of si->conn. Now the
only users are those who initialize the new connection. The difficulty
appears in a few places such as backend.c, proto_http.c, peers.c where
si->conn is used to hold the connection's target address before assigning
the connection to the stream interface. This is why we have to keep
si->conn for now. A future improvement might consist in dynamically
allocating the connection when it is needed.
12 files changed:
include/proto/stream_interface.h
include/types/stream_interface.h
src/backend.c
src/dumpstats.c
src/frontend.c
src/log.c
src/peers.c
src/proto_http.c
src/proto_tcp.c
src/session.c
src/ssl_sock.c
src/stream_interface.c