Soft Patch Panel
 help / color / mirror / Atom feed
* [spp] [PATCH] spp-ctl: truncate null chars in response message
@ 2019-07-25 11:25 yasufum.o
  0 siblings, 0 replies; only message in thread
From: yasufum.o @ 2019-07-25 11:25 UTC (permalink / raw)
  To: spp, ferruh.yigit, yasufum.o

From: Yasufumi Ogawa <yasufum.o@gmail.com>

Spp-ctl uses response message from SPP process as debug message. This
update is to truncate nouse null in the response.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
 src/spp-ctl/spp_proc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spp-ctl/spp_proc.py b/src/spp-ctl/spp_proc.py
index 2bc14e6..33bde43 100644
--- a/src/spp-ctl/spp_proc.py
+++ b/src/spp-ctl/spp_proc.py
@@ -110,7 +110,7 @@ def exec_command(func):
             if data is None:
                 raise RuntimeError("%s(%d): %s: no-data returned" %
                                    (self.type, self.id, command))
-            LOG.debug("reply: %s", data)
+            LOG.debug("reply: %s", data.replace('\0', ''))
             return self._decode_reply(data)
     return wrapper
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-25 11:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 11:25 [spp] [PATCH] spp-ctl: truncate null chars in response message yasufum.o

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).