mirror of
https://github.com/espressif/openthread.git
synced 2026-08-30 22:09:54 +00:00
spinel-cli: fix corner case in hdlc parser. (#859)
This commit is contained in:
committed by
Jonathan Hui
parent
24d4eec0a5
commit
5346d81669
@@ -99,7 +99,11 @@ class Hdlc(IStream):
|
||||
if CONFIG.DEBUG_HDLC:
|
||||
raw.append(byte)
|
||||
if byte == HDLC_FLAG:
|
||||
break
|
||||
if len(packet) != 0:
|
||||
break
|
||||
else:
|
||||
# If multiple FLAG bytes in a row, keep looking for data.
|
||||
continue
|
||||
if byte == HDLC_ESCAPE:
|
||||
byte = self.stream.read()
|
||||
if CONFIG.DEBUG_HDLC:
|
||||
|
||||
Reference in New Issue
Block a user