summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-04-23 08:58:57 -0700
committerFlorin Coras <florin.coras@gmail.com>2021-04-23 16:04:00 +0000
commit893bc97ed6eb426dd8c0dc9489a810e206b3fcf6 (patch)
treede3897d30511a12a4a26ee644ea0edf70bb82fa0 /src/vnet/session/session_api.c
parent961d3631125df357c966f6ea4ee7b5fe57421c45 (diff)
session: set connected session index for ct
Set connected session index for ct as well. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id82ffcf5572b6a9d2769c0e685c7a0b4d1ea9e9f
Diffstat (limited to 'src/vnet/session/session_api.c')
-rw-r--r--src/vnet/session/session_api.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index f54a46b39ba..cf5a66d9e7a 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -303,8 +303,6 @@ mq_send_session_connected_cb (u32 app_wrk_index, u32 api_context,
m.server_rx_fifo = fifo_segment_fifo_offset (s->rx_fifo);
m.server_tx_fifo = fifo_segment_fifo_offset (s->tx_fifo);
m.segment_handle = session_segment_handle (s);
- s->rx_fifo->shr->client_session_index = api_context;
- s->tx_fifo->shr->client_session_index = api_context;
}
else
{
@@ -326,6 +324,11 @@ mq_send_session_connected_cb (u32 app_wrk_index, u32 api_context,
m.ct_segment_handle = session_segment_handle (ss);
}
+ /* Setup client session index in advance, in case data arrives
+ * before the app processes message and updates it */
+ s->rx_fifo->shr->client_session_index = api_context;
+ s->tx_fifo->shr->client_session_index = api_context;
+
snd_msg:
app_mq = app_wrk->event_queue;