aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-21 16:07:46 -0700
committerDave Barach <openvpp@barachs.net>2020-04-03 22:10:22 +0000
commit00e01d3e875bb18397ff81e0f58f9b468477f473 (patch)
tree277b9ce692a465644de5d3481b42e6cce6394f46 /src/vcl
parent39aa7a5202a6a875bd6f5d341cb07f19ab0bf51e (diff)
session: improve error reporting
Type: improvement Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/vcl_bapi.c2
-rw-r--r--src/vcl/vcl_private.h2
-rw-r--r--src/vcl/vppcom.c6
3 files changed, 4 insertions, 6 deletions
diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c
index 077024ed2cf..4ec09089cd8 100644
--- a/src/vcl/vcl_bapi.c
+++ b/src/vcl/vcl_bapi.c
@@ -33,7 +33,7 @@
#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
-u8 *
+static u8 *
format_api_error (u8 * s, va_list * args)
{
i32 error = va_arg (*args, u32);
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index 38818d2d356..12af09fbf55 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -667,8 +667,6 @@ void vcl_segment_detach (u64 segment_handle);
u32 vcl_max_nsid_len (void);
-u8 *format_api_error (u8 * s, va_list * args);
-
void vls_init ();
#endif /* SRC_VCL_VCL_PRIVATE_H_ */
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index ba1f1166556..9a19348cad4 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -445,7 +445,7 @@ vcl_session_connected_handler (vcl_worker_t * wrk,
if (mp->retval)
{
VDBG (0, "ERROR: session index %u: connect failed! %U",
- session_index, format_api_error, ntohl (mp->retval));
+ session_index, format_session_error, mp->retval);
session->session_state = STATE_DETACHED | STATE_DISCONNECT;
session->vpp_handle = mp->handle;
return session_index;
@@ -565,7 +565,7 @@ vcl_session_bound_handler (vcl_worker_t * wrk, session_bound_msg_t * mp)
if (mp->retval)
{
VERR ("session %u [0x%llx]: bind failed: %U", sid, mp->handle,
- format_api_error, mp->retval);
+ format_session_error, mp->retval);
if (session)
{
session->session_state = STATE_DETACHED;
@@ -633,7 +633,7 @@ vcl_session_unlisten_reply_handler (vcl_worker_t * wrk, void *data)
if (mp->retval)
VDBG (0, "ERROR: session %u [0xllx]: unlisten failed: %U",
- s->session_index, mp->handle, format_api_error, ntohl (mp->retval));
+ s->session_index, mp->handle, format_session_error, mp->retval);
if (mp->context != wrk->wrk_index)
VDBG (0, "wrong context");