aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/application.c2
-rw-r--r--src/vnet/session/application.h2
-rw-r--r--src/vnet/session/session.c10
-rw-r--r--src/vnet/session/stream_session.h3
4 files changed, 8 insertions, 9 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 78c41b938cf..bc837bb2939 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -329,7 +329,7 @@ application_open_session (application_t * app, session_type_t sst,
return rv;
/* Store api_context for when the reply comes. Not the nicest thing
- * but better allocating a separate half-open pool. */
+ * but better than allocating a separate half-open pool. */
tc->s_index = api_context;
return 0;
diff --git a/src/vnet/session/application.h b/src/vnet/session/application.h
index 29d37a06b18..45bc00131f5 100644
--- a/src/vnet/session/application.h
+++ b/src/vnet/session/application.h
@@ -37,7 +37,7 @@ typedef struct _stream_session_cb_vft
int (*session_accept_callback) (stream_session_t * new_session);
/* Connection request callback */
- int (*session_connected_callback) (u32 app_index, u32 api_context,
+ int (*session_connected_callback) (u32 app_index, u32 opaque,
stream_session_t * s, u8 code);
/** Notify app that session is closing */
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 3a3e4dfe588..843d474fa19 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -373,7 +373,7 @@ stream_session_connect_notify (transport_connection_t * tc, u8 is_fail)
application_t *app;
stream_session_t *new_s = 0;
u64 handle;
- u32 api_context = 0;
+ u32 opaque = 0;
int error = 0;
handle = stream_session_half_open_lookup_handle (&tc->lcl_ip, &tc->rmt_ip,
@@ -385,9 +385,11 @@ stream_session_connect_notify (transport_connection_t * tc, u8 is_fail)
return -1;
}
- /* Get the app's index from the handle we stored when opening connection */
+ /* Get the app's index from the handle we stored when opening connection
+ * and the opaque (api_context for external apps) from transport session
+ * index*/
app = application_get (handle >> 32);
- api_context = tc->s_index;
+ opaque = tc->s_index;
if (!is_fail)
{
@@ -406,7 +408,7 @@ stream_session_connect_notify (transport_connection_t * tc, u8 is_fail)
}
/* Notify client application */
- if (app->cb_fns.session_connected_callback (app->index, api_context, new_s,
+ if (app->cb_fns.session_connected_callback (app->index, opaque, new_s,
is_fail))
{
clib_warning ("failed to notify app");
diff --git a/src/vnet/session/stream_session.h b/src/vnet/session/stream_session.h
index 4c26321194d..39bf846aca7 100644
--- a/src/vnet/session/stream_session.h
+++ b/src/vnet/session/stream_session.h
@@ -83,9 +83,6 @@ typedef struct _stream_session_t
u32 opaque2;
- /** connected (server) session handle */
- u64 server_session_handle;
-
/** Opaque, pad to a 64-octet boundary */
u64 opaque[1];
} stream_session_t;