summaryrefslogtreecommitdiffstats
path: root/src/vat/api_format.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-06-12 16:50:38 -0400
committerFlorin Coras <florin.coras@gmail.com>2019-06-12 21:58:33 +0000
commitf35a07273f252b98f65126c747bfb1eb435f0ace (patch)
treeddd1f99c11d539bfb9d20fa5311f27dcc344ed3e /src/vat/api_format.c
parent0f87dfeec6c38035e6fbcfdd9a33c60c51f9514e (diff)
infra: fix minor memory leak in "api trace..."
Build api trace message print fns into the built-in copy of api_format.c Optimize memory allocator behavior when the api trace wraps. Type: Fix Change-Id: If799d8784a459f981fc9ee3a3ca03d3f63b2bcd0 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r--src/vat/api_format.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index be074bec615..60d66be368d 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -73,7 +73,11 @@
#undef vl_endianfun
/* instantiate all the print functions we know about */
+#if VPP_API_TEST_BUILTIN == 0
#define vl_print(handle, ...)
+#else
+#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
+#endif
#define vl_printfun
#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun