X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fsession.c;h=843d474fa198d3ddcdfb8aa99b4b10ada0ed727a;hb=ab0289a85c45699878d203b4a0d2e5b38c36cc55;hp=3a3e4dfe58813004f84bbd3101a8885fb129f269;hpb=8ddd518f9a65af77dc3294f1965452aa72cb0eb2;p=vpp.git 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");