mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 06:54:37 +00:00
MINOR: get rid of si_takeover_conn()
Since last commit, this function is an exact copy of si_prepare_conn().
This commit is contained in:
parent
37213433a8
commit
c10aec299f
@ -54,8 +54,9 @@ static inline void si_prepare_none(struct stream_interface *si)
|
||||
}
|
||||
|
||||
/* Assign the stream interface's pre-allocated connection to the end point,
|
||||
* and initialize the connection's context. This is used for outgoing
|
||||
* connections.
|
||||
* and leave the connection's context untouched. This is used for incoming
|
||||
* and outgoing connections. The caller is responsible for ensuring that
|
||||
* si->conn already points to the connection.
|
||||
*/
|
||||
static inline void si_prepare_conn(struct stream_interface *si, const struct protocol *ctrl, const struct xprt_ops *xprt)
|
||||
{
|
||||
@ -66,19 +67,6 @@ static inline void si_prepare_conn(struct stream_interface *si, const struct pro
|
||||
conn_assign(conn, &si_conn_cb, ctrl, xprt, si);
|
||||
}
|
||||
|
||||
/* Assign the stream interface's pre-allocated connection to the end point,
|
||||
* and leave the connection's context untouched. This is used for incoming
|
||||
* connections.
|
||||
*/
|
||||
static inline void si_takeover_conn(struct stream_interface *si, const struct protocol *ctrl, const struct xprt_ops *xprt)
|
||||
{
|
||||
struct connection *conn = si->conn;
|
||||
|
||||
si->ops = &si_conn_ops;
|
||||
si->end = &conn->obj_type;
|
||||
conn_assign(conn, &si_conn_cb, ctrl, xprt, si);
|
||||
}
|
||||
|
||||
static inline void si_prepare_applet(struct stream_interface *si, struct si_applet *applet)
|
||||
{
|
||||
si->ops = &si_embedded_ops;
|
||||
|
@ -426,7 +426,7 @@ int session_complete(struct session *s)
|
||||
|
||||
/* attach the incoming connection to the stream interface now */
|
||||
s->si[0].conn = conn;
|
||||
si_takeover_conn(&s->si[0], l->proto, l->xprt);
|
||||
si_prepare_conn(&s->si[0], l->proto, l->xprt);
|
||||
|
||||
s->flags |= SN_INITIALIZED;
|
||||
s->unique_id = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user