mdb: fix handling of messages with checksum = 0

master
informatic 2023-11-11 21:06:35 +01:00
parent ed247af604
commit a9012778fc
1 changed files with 2 additions and 2 deletions

View File

@ -35,8 +35,8 @@ class MDBRequest(object):
def validate_checksum(self):
try:
if self.ack:
if len(self.data) == 1 and self.processed:
if self.processed and self.ack:
if len(self.data) == 1:
return True # Only ACK
return len(self.data) >= 2 and self.data[-2] == compute_checksum(