summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-06-13 10:14:28 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-06-17 14:05:37 +0000
commit2f0f96b9dbcb198dede1e5ebd4d880129d5d52c8 (patch)
tree41dc5f84d8fadda65234f5c990dbdc78392b0d91 /src/vnet/session/session.c
parent8a2fa3b482b2f32da8e0b634fd09c9bdef2e9443 (diff)
session: use listener_handle instead of listener_index
Type: refactor Change-Id: I97fa59a0ba0b6b7a98698926020ffffcf6ae6ba3 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 298d8d8bb06..4b3ce016be5 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -168,6 +168,7 @@ session_alloc (u32 thread_index)
clib_memset (s, 0, sizeof (*s));
s->session_index = s - wrk->sessions;
s->thread_index = thread_index;
+ s->app_index = APP_INVALID_INDEX;
return s;
}
@@ -877,13 +878,13 @@ session_stream_accept_notify (transport_connection_t * tc)
*/
int
session_stream_accept (transport_connection_t * tc, u32 listener_index,
- u8 notify)
+ u32 thread_index, u8 notify)
{
session_t *s;
int rv;
s = session_alloc_for_connection (tc);
- s->listener_index = listener_index;
+ s->listener_handle = ((u64) thread_index << 32) | (u64) listener_index;
s->session_state = SESSION_STATE_CREATED;
if ((rv = app_worker_init_accepted (s)))