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

system: Keep DBus connection to tuned open over service state changes #21115

Conversation

mvollmer
Copy link
Member

This is ok, the DBus service on the other end of a DBusClient can come and go, the DBusClient keeps working.

This avoids closing the DBusClient while it is being used by the rest of the code.

@mvollmer
Copy link
Member Author

This is an alternative to #21114. It changes less code and starts the service while the dialog is open (which is nice because we already see the spinner while the service starts.)

This is ok, the DBus service on the other end of a DBusClient can come
and go, the DBusClient keeps working.

This avoids closing the DBusClient while it is being used by the rest
of the code.
@mvollmer mvollmer force-pushed the tuned-straighten-out-dbus-connections-2 branch from 0df1ee3 to 6614bdb Compare October 14, 2024 12:48
if (state == "not-installed")
status = _("Tuned is not available");
else if (state == "not-running")
status = _("Tuned is not running");
Copy link
Contributor

Choose a reason for hiding this comment

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

This added line is not executed by any test.

else if (state == "not-running")
status = _("Tuned is not running");
else if (active == "none")
status = _("Tuned is off");
Copy link
Contributor

Choose a reason for hiding this comment

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

This added line is not executed by any test.

else if (active == "none")
status = _("Tuned is off");
else if (active == recommended)
status = _("This system is using the recommended profile");
Copy link
Contributor

Choose a reason for hiding this comment

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

This added line is not executed by any test.

else if (active == recommended)
status = _("This system is using the recommended profile");
else
status = _("This system is using a custom profile");
Copy link
Contributor

Choose a reason for hiding this comment

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

This added line is not executed by any test.

Comment on lines +113 to +115
Dialogs.show(<TunedDialog updateButton={() => update(tunedDbus)}
poll={() => poll(tunedDbus)}
tunedDbus={tunedDbus} tunedService={tunedService} />);
Copy link
Contributor

Choose a reason for hiding this comment

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

These 3 added lines are not executed by any test.

@mvollmer
Copy link
Member Author

No, this doesn't work, unfortunately. Our DBusClient can survive the owner going away and coming back, but there must be an owner when opening the channel. So it works well with auto-activating DBus services that might get restarted, but not here with tuned. Bummer.

@mvollmer mvollmer closed this Oct 14, 2024
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.

2 participants