From c9940fc20bf248ba10dad10108415219f0f8360f Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 5 Feb 2019 20:55:11 -0800 Subject: session: refactor listen logic Make app-listener the handle for app listens. Consequently transport and local listen sessions are now associated to the app-listener. Change-Id: I9397a26d42cccb100970b6b4794c15bac2e11465 Signed-off-by: Florin Coras --- src/vnet/session/session.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vnet/session/session.c') diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 6833a93e12b..532a242cc5f 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -945,7 +945,7 @@ session_transport_reset_notify (transport_connection_t * tc) * Accept a stream session. Optionally ping the server by callback. */ int -stream_session_accept (transport_connection_t * tc, u32 listener_index, +session_stream_accept (transport_connection_t * tc, u32 listener_index, u8 notify) { session_t *s, *listener; @@ -955,7 +955,7 @@ stream_session_accept (transport_connection_t * tc, u32 listener_index, /* Find the server */ listener = listen_session_get (listener_index); - app_wrk = application_listener_select_worker (listener, 0); + app_wrk = application_listener_select_worker (listener); sm = app_worker_get_listen_segment_manager (app_wrk, listener); if ((rv = session_alloc_and_init (sm, tc, 1, &s))) @@ -1119,7 +1119,7 @@ session_listen (session_t * ls, session_endpoint_cfg_t * sep) /* Add to the main lookup table after transport was initialized */ tc = transport_get_listener (sep->transport_proto, tc_index); - session_lookup_add_connection (tc, s_index); + session_lookup_add_connection (tc, listen_session_get_handle (ls)); return 0; } -- cgit 1.2.3-korg