diff options
author | Ole Troan <ot@cisco.com> | 2019-05-10 12:01:10 +0200 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-05-10 21:50:34 +0000 |
commit | 72d8758fdc2266b9f4cd53063da2d23f0855c1df (patch) | |
tree | 972c5260846e3cc5c10a9be8c6318812ed5faa75 /src/vpp | |
parent | f89a6de8f032536080c4a11b267bf921093d3740 (diff) |
cli: Add return value in cli_inband
Even when a CLI command called through the cli_inband API failed
the API would return 0 (SUCCESS). This patch fixes that,
but since most CLI handlers return error->code == 0,
in most failure cases it will return -1 (UNSPECIFIED ERROR).
Type: fix
Change-Id: Ic83f3b23e8e8954bb8aa211301baba24e8c20ef6
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp')
-rw-r--r-- | src/vpp/api/api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c index c5c2480ea87..b389a7a7a63 100644 --- a/src/vpp/api/api.c +++ b/src/vpp/api/api.c @@ -226,7 +226,7 @@ vl_api_cli_inband_t_handler (vl_api_cli_inband_t * mp) unformat_init_string (&input, (char *) vl_api_from_api_string (&mp->cmd), vl_api_string_len (&mp->cmd)); - vlib_cli_input (vm, &input, inband_cli_output, (uword) & out_vec); + rv = vlib_cli_input (vm, &input, inband_cli_output, (uword) & out_vec); len = vec_len (out_vec); |