[Cryptech-Commits] [sw/libhal] branch pymux updated: Log packet drops.

git at cryptech.is git at cryptech.is
Tue Apr 11 12:52:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch pymux
in repository sw/libhal.

The following commit(s) were added to refs/heads/pymux by this push:
     new 5291c46  Log packet drops.
5291c46 is described below

commit 5291c46a6d43813af6a1a59dcecda03229869004
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Tue Apr 11 08:46:43 2017 -0400

    Log packet drops.
---
 cryptech_muxd | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cryptech_muxd b/cryptech_muxd
index dacf889..dc20b62 100755
--- a/cryptech_muxd
+++ b/cryptech_muxd
@@ -164,10 +164,13 @@ class RPCIOStream(SerialIOStream):
                     q.put_nowait(None)
                 return
             logger.debug("RPC recv: %s", ":".join("{:02x}".format(ord(c)) for c in reply))
+            if reply == SLIP_END:
+                continue
             try:
                 handle = client_handle_get(slip_decode(reply))
                 queue  = self.queues[handle]
             except:
+                logger.debug("RPC skipping bad packet")
                 continue
             logger.debug("RPC queue put: handle 0x%x, qsize %s, maxsize %s",
                          handle, queue.qsize(), queue.maxsize)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list