Skip to content
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

CAN: Fix semaphore unlock in the report tx handler #13

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

pasrom
Copy link
Contributor

@pasrom pasrom commented Jan 4, 2024

Moved the semaphore unlock statement outside the #endif directive in can.c. This ensures proper unlocking of the semaphore for both cases, whether CONFIG_THINGSET_CAN_PACKETIZED_REPORTS_TX is enabled or not. Resolves the issue of warning and failure in TX CAN communication when the configuration is disabled.
Fixes #12.

Moved the semaphore unlock statement outside the `#endif` directive in `can.c`. This ensures proper unlocking of the semaphore for both cases, whether `CONFIG_THINGSET_CAN_PACKETIZED_REPORTS_TX` is enabled or not. Resolves the issue of warning and failure in TX CAN communication when the configuration is disabled.
Copy link
Contributor

@martinjaeger martinjaeger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks.

@martinjaeger martinjaeger merged commit b0885e3 into ThingSet:main Jan 4, 2024
1 check passed
@pasrom pasrom deleted the fix-rx-can branch January 24, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing unlock for sbuf->lock semaphore when CONFIG_THINGSET_CAN_PACKETIZED_REPORTS_TX is disabled
3 participants