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

Fix raciness on MCE plugin. JB#61050 #9

Merged
merged 2 commits into from Dec 1, 2023
Merged

Fix raciness on MCE plugin. JB#61050 #9

merged 2 commits into from Dec 1, 2023

Conversation

pvuorela
Copy link
Contributor

Scenario:

  • have event in play state, optionally wait some time before continuing
  • stop event
  • restart event quickly after the previous
  • mce signal for stop arrives, previous restart is still pending on mce
  • code calls n_sink_interface_complete, which seems to trigger yet another stop.

Thus now tracking for active event when mce reports them playing and ignoring the deactivation signal that comes too soon. Stop also tracks what's expecting to be active.

Also another commit for a couple minor cleanups.

Fix typo, remove unused variable, remove couple hard tabs in the middle of
indentation by spaces.
src/plugins/mce/plugin.c Outdated Show resolved Hide resolved
src/plugins/mce/plugin.c Outdated Show resolved Hide resolved
src/plugins/mce/plugin.c Outdated Show resolved Hide resolved
src/plugins/mce/plugin.c Outdated Show resolved Hide resolved
Scenario:
- have event in play state, optionally wait some time before continuing
- stop event
- restart event quickly after the previous
- mce signal for stop arrives, previous restart is still pending on mce
- code calls n_sink_interface_complete, which seems to trigger yet another
stop.

Thus now tracking for active event when mce reports them playing and
ignoring the deactivation signal that comes too soon. Stop also tracks
what's expecting to be active.
{
(void) core;
(void) msg;
gchar *pattern = (gchar*) userdata;
Copy link

Choose a reason for hiding this comment

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

nit: As this is C: superfluous void pointer cast. Then again, the already existing code is littered with these... nevermind

src/plugins/mce/plugin.c Show resolved Hide resolved
src/plugins/mce/plugin.c Show resolved Hide resolved
@pvuorela pvuorela merged commit 7d0c591 into master Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants