-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHDLC: Separate error value for too long frames #50
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Small change with a big usability and debugging improvement 🙂
While an added error value may be considered a breaking change, I wouldn't call it breaking, since we make no guarantee about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update changelog?
5f11941
to
c312ab0
Compare
done |
Better error handling when decoding incorrect SHDLC frames: * Add a new error constant `SENSIRION_SHDLC_ERR_FRAME_TOO_LONG` which is returned when the frame contains more data than expected (the length field) * When a CRC is supplied, it is now checked before checking if the frame is too long, causing the exit path (CRC error) to be backtraceable.
c312ab0
to
d599ad1
Compare
Better error handling when decoding incorrect SHDLC frames:
SENSIRION_SHDLC_ERR_FRAME_TOO_LONG
whichis returned when the frame contains more data than expected (the
length field)
frame is too long, causing the exit path (CRC error) to be
backtraceable.
Check the following:
make style-fix
)