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

Children cannot become valid again. #297

Open
Takkaryx opened this issue Mar 16, 2024 · 0 comments
Open

Children cannot become valid again. #297

Takkaryx opened this issue Mar 16, 2024 · 0 comments

Comments

@Takkaryx
Copy link

Takkaryx commented Mar 16, 2024

If the path_remove function of a proxy child is correctly called, the child is considered not valid no matter if there are any other paths still valid. or even if a path is added again after the fact.

This is particularly present relevant in the case of a DFU process occurring while there is a SimpleBLE process ongoing.

The device will (most likely) reboot, and all paths from the proxy will be removed. but then new ones will be added back.

Because of this bug, the Proxy is still considered invalid even though there are paths and communucations again. but it means that later the Adapter call std::vector<std::shared_ptr<Device>> Adapter::device_paired_get() will believe the Proxy is invalid even though it is technically valid now.

proposal:

────────────────────────────────────────────────────────────────────────────────────────┐
• 164: void Proxy::path_add(const std::string& path, SimpleDBus::Holder managed_interfa │
────────────────────────────────────────────────────────────────────────────────────────┘
            on_child_created(child_path);
        }
    }
    _valid = true;
}

bool Proxy::path_remove(const std::string& path, SimpleDBus::Holder options) {

proxy.patch

(I have a branch locally that does this, but I don't have permission to push to this repo)

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

No branches or pull requests

1 participant