diff options
author | Florin Coras <fcoras@cisco.com> | 2018-12-03 17:47:26 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-12-04 12:03:06 +0000 |
commit | dc2e251398b196a6fa3b2287f0755330757df02a (patch) | |
tree | 11e7f94b38fff59c6944881a47df93d8959f755a /src/vnet | |
parent | 44cea225e2238a3c549f17f315cd1fbc6978c277 (diff) |
vcl: test refactor and improvements
Change-Id: I92f415bf253d6e051ec9d94ebeb98f081b2a0293
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rwxr-xr-x | src/vnet/session/session_api.c | 5 | ||||
-rw-r--r-- | src/vnet/session/transport.c | 5 |
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 { |