mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-31 10:31:46 +00:00
MINOR: session: make use of session_new() when creating a new session
It's better than open-coding it.
This commit is contained in:
parent
c38f71cfcd
commit
64beab202c
@ -117,7 +117,7 @@ int session_accept_fd(struct listener *l, int cfd, struct sockaddr_storage *addr
|
||||
if (conn_xprt_init(cli_conn) < 0)
|
||||
goto out_free_conn;
|
||||
|
||||
sess = pool_alloc2(pool2_session);
|
||||
sess = session_new(p, l, &cli_conn->obj_type);
|
||||
if (!sess)
|
||||
goto out_free_conn;
|
||||
|
||||
@ -128,13 +128,6 @@ int session_accept_fd(struct listener *l, int cfd, struct sockaddr_storage *addr
|
||||
|
||||
proxy_inc_fe_conn_ctr(l, p);
|
||||
|
||||
sess->listener = l;
|
||||
sess->fe = p;
|
||||
sess->origin = &cli_conn->obj_type;
|
||||
sess->accept_date = date; /* user-visible date for logging */
|
||||
sess->tv_accept = now; /* corrected date for internal use */
|
||||
memset(sess->stkctr, 0, sizeof(sess->stkctr));
|
||||
|
||||
/* now evaluate the tcp-request layer4 rules. We only need a session
|
||||
* and no stream for these rules.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user