[spp] [PATCH 4/4] spp_vf: fix bug of status command

x-fn-spp at sl.ntt-tx.co.jp x-fn-spp at sl.ntt-tx.co.jp
Wed Jan 10 03:48:01 CET 2018


From: Hiroyuki Nakamura <nakamura.hioryuki at po.ntt-tx.co.jp>

Fix a bug that displays unnecessary commas
in response JSON message.

Fixes: 67467caec0e7 ("spp_vf: fix to eliminate jansson package")
Cc: watanabe.kentaro.z01 at as.ntt-tx.co.jp

Signed-off-by: Kentaro Watanabe <watanabe.kentaro.z01 at as.ntt-tx.co.jp>
Signed-off-by: Yasufum Ogawa <ogawa.yasufumi at lab.ntt.co.jp>
---
 src/vf/command_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vf/command_proc.c b/src/vf/command_proc.c
index d7fbded..a97b9af 100644
--- a/src/vf/command_proc.c
+++ b/src/vf/command_proc.c
@@ -358,7 +358,7 @@ append_interface_array(char **output, const enum port_type type)
 		if (!spp_check_flush_port(type, i))
 			continue;
 
-		sprintf(tmp_str, "%s%d", JSON_APPEND_COMMA(i), i);
+		sprintf(tmp_str, "%s%d", JSON_APPEND_COMMA(port_cnt), i);
 
 		*output = spp_strbuf_append(*output, tmp_str, strlen(tmp_str));
 		if (unlikely(*output == NULL)) {
-- 
1.9.1



More information about the spp mailing list