From c1a4265b4b76bf7874b53e866549371c8daf70f4 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 8 Feb 2019 18:27:29 -0800 Subject: session: cleanup application interface Change-Id: I89d240753b3f3c5e984aa303a7c8fa35fa59bf7f Signed-off-by: Florin Coras --- src/vnet/tls/tls.c | 13 +++++++------ src/vnet/tls/tls.h | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/vnet/tls') diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c index e36a88476ee..d78dbcfc79c 100644 --- a/src/vnet/tls/tls.c +++ b/src/vnet/tls/tls.c @@ -529,10 +529,10 @@ tls_connect (transport_endpoint_cfg_t * tep) tls_engine_type_t engine_type; tls_main_t *tm = &tls_main; app_worker_t *app_wrk; - clib_error_t *error; application_t *app; tls_ctx_t *ctx; u32 ctx_index; + int rv; sep = (session_endpoint_cfg_t *) tep; app_wrk = app_worker_get (sep->app_wrk_index); @@ -563,8 +563,8 @@ tls_connect (transport_endpoint_cfg_t * tep) cargs->sep.transport_proto = TRANSPORT_PROTO_TCP; cargs->app_index = tm->app_index; cargs->api_context = ctx_index; - if ((error = vnet_connect (cargs))) - return clib_error_get_code (error); + if ((rv = vnet_connect (cargs))) + return rv; TLS_DBG (1, "New connect request %u engine %d", ctx_index, engine_type); return 0; @@ -641,15 +641,16 @@ tls_stop_listen (u32 lctx_index) { tls_engine_type_t engine_type; tls_ctx_t *lctx; + int rv; lctx = tls_listener_ctx_get (lctx_index); - vnet_unbind_args_t a = { + vnet_unlisten_args_t a = { .handle = lctx->tls_session_handle, .app_index = tls_main.app_index, .wrk_map_index = 0 /* default wrk */ }; - if (vnet_unlisten (&a)) - clib_warning ("unbind returned"); + if ((rv = vnet_unlisten (&a))) + clib_warning ("unlisten returned %d", rv); engine_type = lctx->tls_ctx_engine; tls_vfts[engine_type].ctx_stop_listen (lctx); diff --git a/src/vnet/tls/tls.h b/src/vnet/tls/tls.h index 5ddce9ae56c..ac0b39b8295 100644 --- a/src/vnet/tls/tls.h +++ b/src/vnet/tls/tls.h @@ -14,6 +14,7 @@ */ #include +#include #include #include -- cgit 1.2.3-korg