summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-03 17:47:26 -0800
committerDamjan Marion <dmarion@me.com>2018-12-04 12:03:06 +0000
commitdc2e251398b196a6fa3b2287f0755330757df02a (patch)
tree11e7f94b38fff59c6944881a47df93d8959f755a /src/vnet/session/session_api.c
parent44cea225e2238a3c549f17f315cd1fbc6978c277 (diff)
vcl: test refactor and improvements
Change-Id: I92f415bf253d6e051ec9d94ebeb98f081b2a0293 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_api.c')
-rwxr-xr-xsrc/vnet/session/session_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 6ce9e1feac3..31139c32ed5 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -409,6 +409,7 @@ mq_try_lock_and_alloc_msg (svm_msg_q_t * app_mq, svm_msg_q_msg_t * msg)
return 0;
try++;
}
+ clib_warning ("failed to alloc msg");
return -1;
}
@@ -588,16 +589,18 @@ mq_send_session_connected_cb (u32 app_wrk_index, u32 api_context,
if (mq_try_lock_and_alloc_msg (app_mq, msg))
return -1;
+
evt = svm_msg_q_msg_data (app_mq, msg);
clib_memset (evt, 0, sizeof (*evt));
evt->event_type = SESSION_CTRL_EVT_CONNECTED;
mp = (session_connected_msg_t *) evt->data;
mp->context = api_context;
- mp->segment_handle = session_segment_handle (s);
if (is_fail)
goto done;
+ mp->segment_handle = session_segment_handle (s);
+
if (session_has_transport (s))
{
tc = session_get_transport (s);