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

Revert change to report interval logic #325

Merged

Conversation

jw3
Copy link
Contributor

@jw3 jw3 commented Nov 26, 2024

Undo a change that came along with code formatting in 75acb36.

There was an else block changed to an else if at line 418 which caused the pthread_cond_wait call to fall outside of the else block.

Closes #324

@jw3 jw3 force-pushed the 324-fix_state_reports branch 2 times, most recently from 7d4f452 to 8be8211 Compare November 26, 2024 18:50
75acb36 changed the `else` block to an `else if` at line 418 which caused the `pthread_cond_wait` call to fall outside of the block.

This commit restores the else so `pthread_cond_wait` falls within the else and is only called when reporting is disabled.
@jw3 jw3 force-pushed the 324-fix_state_reports branch from 8be8211 to 38b2242 Compare November 26, 2024 19:02
@jw3 jw3 changed the title Fix reporting issue in decision thread Fix interval reporting Nov 28, 2024
@jw3
Copy link
Contributor Author

jw3 commented Dec 29, 2024

Thoughts on this one @radosroka?

@jw3 jw3 changed the title Fix interval reporting Revert change to report interval logic Jan 3, 2025
@stevegrubb
Copy link
Member

Thanks for the patch. I reviewed it. It restores the code as it was at commit 5a8f685. But it also adds a "if (stop)" check before the pthread_cond_wait. That change in flow made the comparison look more complicated than at first glance, but it also fixes it by not waiting if we are stopping. Looks good to me.

@stevegrubb stevegrubb merged commit 3df9987 into linux-application-whitelisting:main Jan 18, 2025
17 of 30 checks passed
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.

Interval reports hang decision thread
2 participants