diff options
author | Florin Coras <fcoras@cisco.com> | 2019-10-21 16:07:46 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-04-03 22:10:22 +0000 |
commit | 00e01d3e875bb18397ff81e0f58f9b468477f473 (patch) | |
tree | 277b9ce692a465644de5d3481b42e6cce6394f46 /src/vnet/session/application.c | |
parent | 39aa7a5202a6a875bd6f5d341cb07f19ab0bf51e (diff) |
session: improve error reporting
Type: improvement
Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application.c')
-rw-r--r-- | src/vnet/session/application.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c index 7923d2d050e..8d7c909ba67 100644 --- a/src/vnet/session/application.c +++ b/src/vnet/session/application.c @@ -1019,7 +1019,7 @@ vnet_connect (vnet_connect_args_t * a) ASSERT (vlib_thread_is_main_w_barrier ()); if (session_endpoint_is_zero (&a->sep)) - return VNET_API_ERROR_INVALID_VALUE; + return SESSION_E_INVALID_RMT_IP; client = application_get (a->app_index); session_endpoint_update_for_app (&a->sep_ext, client, 1 /* is_connect */ ); @@ -1039,13 +1039,12 @@ vnet_connect (vnet_connect_args_t * a) rv = app_worker_connect_session (client_wrk, &a->sep, a->api_context); if (rv <= 0) return rv; + a->sep_ext.transport_proto = a->sep_ext.original_tp; } /* * Not connecting to a local server, propagate to transport */ - if (app_worker_connect_session (client_wrk, &a->sep, a->api_context)) - return VNET_API_ERROR_SESSION_CONNECT; - return 0; + return app_worker_connect_session (client_wrk, &a->sep, a->api_context); } int |