Skip to content

fix(dbus) make dbus path parth of a CompositeDevice at construction#266

Merged
ShadowApex merged 1 commit intoShadowBlip:mainfrom
NeroReflex:dbus_fix
Jan 26, 2025
Merged

fix(dbus) make dbus path parth of a CompositeDevice at construction#266
ShadowApex merged 1 commit intoShadowBlip:mainfrom
NeroReflex:dbus_fix

Conversation

@NeroReflex
Copy link
Contributor

@NeroReflex NeroReflex commented Jan 24, 2025

This PR improves the handling of the dbus for CompositeDevice: makes it so a dbus is required to have a CompositeDevice and in no situation the service can crash/panic by removing the .unwrap(). It also simplify the code a bit decreasing lines count.

This is also part of the saga "do not spawn tasks without returning the handle and try not to lose tasks references" albeit in this case the reference is still lost, but it is lost in manager.rs and a future code improvement can pick it up.

@NeroReflex NeroReflex force-pushed the dbus_fix branch 2 times, most recently from ab80e7f to d8c8bfa Compare January 24, 2025 01:17
@NeroReflex NeroReflex marked this pull request as ready for review January 24, 2025 01:18
@pastaq pastaq self-requested a review January 24, 2025 02:12
Copy link
Contributor

@pastaq pastaq left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ShadowApex ShadowApex left a comment

Choose a reason for hiding this comment

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

Minor suggestion, but otherwise looks good! Thanks for this!

DBus path cannot be None as part of the code expects it and it will call .unwrap() on the option potentially crashing the software: construct a CompositeDevice with that value in place and ready for every other subsequent usage.
@ShadowApex ShadowApex merged commit b2f66f1 into ShadowBlip:main Jan 26, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Jan 26, 2025
## [0.42.1](v0.42.0...v0.42.1) (2025-01-26)

### Bug Fixes

* **dbus:** make dbus path parth of a CompositeDevice at construction ([#266](#266)) ([b2f66f1](b2f66f1))
* **Horipad Steam:** Increase poll rate on Horipad Steam ([7cd7108](7cd7108))
* **SourceDevice:** code cleanup ([193b853](193b853))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.42.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants