diff options
author | Florin Coras <fcoras@cisco.com> | 2018-02-14 08:04:31 -0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-02-15 10:53:33 +0000 |
commit | 5fda7a3925be145f0c326d0aecc36d883cbcb2ee (patch) | |
tree | 399956ed3c583d5e8e6d1d75847a11148ee252e6 /src/vnet/session/application.h | |
parent | fae4039ad2af251690e4cb79d5842a6e97029032 (diff) |
session: avoid session handle conflict with vcl
Change-Id: I7f5a3b8d92ef07d60315bab6e560eba49ea07249
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application.h')
-rw-r--r-- | src/vnet/session/application.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vnet/session/application.h b/src/vnet/session/application.h index 4938bef08bd..6fb0f066ad3 100644 --- a/src/vnet/session/application.h +++ b/src/vnet/session/application.h @@ -209,7 +209,7 @@ local_session_parse_handle (session_handle_t handle, u32 * server_index, u32 * session_index) { u32 bottom; - ASSERT ((handle >> 32) == SESSION_LOCAL_TABLE_PREFIX); + ASSERT ((handle >> 32) == SESSION_LOCAL_HANDLE_PREFIX); bottom = (handle & 0xFFFFFFFF); local_session_parse_id (bottom, server_index, session_index); } @@ -217,7 +217,8 @@ local_session_parse_handle (session_handle_t handle, u32 * server_index, always_inline session_handle_t application_local_session_handle (local_session_t * ls) { - return ((u64) SESSION_LOCAL_TABLE_PREFIX << 32) | local_session_id (ls); + return ((u64) SESSION_LOCAL_HANDLE_PREFIX << 32) + | (u64) local_session_id (ls); } always_inline local_session_t * @@ -226,6 +227,16 @@ application_get_local_listen_session (application_t * app, u32 session_index) return pool_elt_at_index (app->local_listen_sessions, session_index); } +always_inline local_session_t * +application_get_local_listener_w_handle (session_handle_t handle) +{ + u32 server_index, session_index; + application_t *app; + local_session_parse_handle (handle, &server_index, &session_index); + app = application_get (server_index); + return application_get_local_listen_session (app, session_index); +} + always_inline u8 application_local_session_listener_has_transport (local_session_t * ls) { |