small additional tweak
This commit is contained in:
parent
d1630cdc4c
commit
1c53b60442
@ -24,6 +24,9 @@ ReturnValue_t DleParser::passData(const uint8_t* data, size_t len) {
|
|||||||
ReturnValue_t DleParser::parseRingBuf(size_t& readSize) {
|
ReturnValue_t DleParser::parseRingBuf(size_t& readSize) {
|
||||||
ctx.setType(DleParser::ContextType::NONE);
|
ctx.setType(DleParser::ContextType::NONE);
|
||||||
size_t availableData = decodeRingBuf.getAvailableReadData();
|
size_t availableData = decodeRingBuf.getAvailableReadData();
|
||||||
|
if(availableData == 0) {
|
||||||
|
return NO_PACKET_FOUND;
|
||||||
|
}
|
||||||
if (availableData > encodedBuf.second) {
|
if (availableData > encodedBuf.second) {
|
||||||
ErrorInfo info;
|
ErrorInfo info;
|
||||||
info.len = decodeRingBuf.getAvailableReadData();
|
info.len = decodeRingBuf.getAvailableReadData();
|
||||||
|
Loading…
Reference in New Issue
Block a user