summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session')
-rwxr-xr-xsrc/vnet/session/session_api.c5
-rw-r--r--src/vnet/session/transport.c5
2 files changed, 8 insertions, 2 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);
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 91b80d7c11e..c2d21bf28f9 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -444,7 +444,10 @@ transport_alloc_local_endpoint (u8 proto, transport_endpoint_cfg_t * rmt_cfg,
error = transport_find_local_ip_for_remote (rmt_cfg->peer.sw_if_index,
rmt, lcl_addr);
if (error)
- return -1;
+ {
+ clib_error_report (error);
+ return -1;
+ }
}
else
{