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

res_musiconhold: Appropriately lock channel during start. #1104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkroonza
Copy link
Contributor

@jkroonza jkroonza commented Jan 31, 2025

This relates to #829

This doesn't fully solve the Ops issue, but it solves the specific crash there. Further PRs to follow.

In the specific crash the generator was still under construction when moh was being stopped, which then proceeded to close the stream whilst it was still in use.

This relates to asterisk#829

This doesn't sully solve the Ops issue, but it solves the specific crash
there.  Further PRs to follow.

In the specific crash the generator was still under construction when
moh was being stopped, which then proceeded to close the stream whilst
it was still in use.

Signed-off-by: Jaco Kroon <[email protected]>
@jkroonza
Copy link
Contributor Author

cherry-pick-to: 20
cherry-pick-to: 21
cherry-pick-to: 22

@asterisk asterisk deleted a comment from github-actions bot Feb 1, 2025
Comment on lines +1765 to +1766
ast_channel_lock(chan);
state = ast_channel_music_state(chan);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just do this (and the unlock) one time at the top of the function? Or do we need to serialize all access to state?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suspect there's potentially some long-running sub-tasks which is why I went a bit more granular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants