prevent can from parsing partial frames
This commit is contained in:
@@ -120,6 +120,8 @@ void read_can(Tel *t, int soc) {
|
||||
|
||||
if (nbytes < 0) return; // -1 EAGAIN means empty
|
||||
|
||||
if (nbytes != sizeof(struct can_frame)) return;
|
||||
|
||||
if (nbytes > 0) {
|
||||
|
||||
switch (frame.can_id) {
|
||||
|
||||
Reference in New Issue
Block a user