summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
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);