]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] backend: initialize the server stream_interface upon connect()
authorWilly Tarreau <w@1wt.eu>
Mon, 31 May 2010 15:44:19 +0000 (17:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Jun 2010 08:53:15 +0000 (10:53 +0200)
commita8f55d54738bf3c4e9071c6109ac0b302bc1c720
tree0b4303e259b7ab7d4f8329d14659727f7331849b
parentd04e858db0e8072529b176321c1c31aa10c82e59
[MEDIUM] backend: initialize the server stream_interface upon connect()

It's not normal to initialize the server-side stream interface from the
accept() function, because it may change later. Thus, we introduce a new
stream_sock_prepare_interface() function which is called just before the
connect() and which sets all of the stream_interface's callbacks to the
default ones used for real sockets. The ->connect function is also set
at the same instant so that we can easily add new server-side protocols
soon.
include/proto/stream_sock.h
src/backend.c
src/stream_sock.c