Index: dialin/protocols/CAN.py =================================================================== diff -u -re10534f3df259e137e0ba14d897ecef42a767737 -r3338499f8613c3e0156b21c5535109c464cc5438 --- dialin/protocols/CAN.py (.../CAN.py) (revision e10534f3df259e137e0ba14d897ecef42a767737) +++ dialin/protocols/CAN.py (.../CAN.py) (revision 3338499f8613c3e0156b21c5535109c464cc5438) @@ -418,6 +418,8 @@ channel_id = message.arbitration_id if not DenaliMessage.PAYLOAD_LENGTH_INDEX < len(can_data): self.logger.error("Invalid denali message received: {0}".format(message)) + self.messages = None # Can't process this message, get the next one + continue else: message_length = can_data[DenaliMessage.PAYLOAD_LENGTH_INDEX] @@ -460,7 +462,7 @@ self.long_msg_channel_id_set.remove(dialin_ch_id) # Need to verify CRC at this point - if DenaliMessage.verify_crc(complete_dialin_message) is False: + if not DenaliMessage.verify_crc(complete_dialin_message): # if verify is False, let's drop (ignore) this message message_valid = False dialin_ch_id = None @@ -489,7 +491,7 @@ else: # no new packets in receive buffer # We have received nothing, let's sleep 1 msec and let's check again - sleep(0.01) + sleep(0.001) def register_receiving_publication_function(self, channel_id, message_id, function): """ Index: tests/send_malformed_message.sh =================================================================== diff -u --- tests/send_malformed_message.sh (revision 0) +++ tests/send_malformed_message.sh (revision 3338499f8613c3e0156b21c5535109c464cc5438) @@ -0,0 +1,8 @@ +#!/bin/bash + +#cansend can0 100#A5.33.03.07.00.04.00.00 +#cansend can0 100#00.00.28.00.00.00.00.00 + +cansend can0 100#A5.33.03.07.01.04.00.00 +cansend can0 100#00.00.00.00.00.00.00.00 +#cansend can0 100#00.00.01.00.00.00.00.00