Soft Patch Panel
 help / color / mirror / Atom feed
From: x-fn-spp@sl.ntt-tx.co.jp
To: spp@dpdk.org
Subject: [spp] [PATCH 4/4] spp_vf: fix bug of status command
Date: Wed, 10 Jan 2018 11:48:01 +0900	[thread overview]
Message-ID: <201801100248.w0A2m1dS006368@imss03.silk.ntt-tx.co.jp> (raw)
In-Reply-To: <201801100246.w0A2kio5005692@imss03.silk.ntt-tx.co.jp>

From: Hiroyuki Nakamura <nakamura.hioryuki@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@as.ntt-tx.co.jp

Signed-off-by: Kentaro Watanabe <watanabe.kentaro.z01@as.ntt-tx.co.jp>
Signed-off-by: Yasufum Ogawa <ogawa.yasufumi@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

  parent reply	other threads:[~2018-01-10  2:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10  2:46 [spp] Patches for spp_vf on DPDK17.11 x-fn-spp
2018-01-10  2:47 ` [spp] [PATCH 1/4] spp_vf: fix to eliminate jansson package x-fn-spp
2018-01-19  0:37   ` Yasufumi Ogawa
2018-01-10  2:47 ` [spp] [PATCH 2/4] spp_vf: support cancel command x-fn-spp
2018-01-10  2:48 ` [spp] [PATCH 3/4] spp_vf: change type of port_id to uint16_t x-fn-spp
2018-01-10  2:48 ` x-fn-spp [this message]
2018-01-10  7:53 ` [spp] Patches for spp_vf on DPDK17.11 Yasufumi Ogawa
2018-01-13 13:38   ` Ferruh Yigit
2018-01-15  2:08     ` Yasufumi Ogawa
2018-01-19  0:30 ` Yasufumi Ogawa
2018-01-22 14:04   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201801100248.w0A2m1dS006368@imss03.silk.ntt-tx.co.jp \
    --to=x-fn-spp@sl.ntt-tx.co.jp \
    --cc=spp@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).