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

emberAfAttributeChanged callback invoked twice for endpoint 0 's PartsList when endpoint is added #37044

Open
chialunl opened this issue Jan 11, 2025 · 2 comments

Comments

@chialunl
Copy link

When adding an endpoint, emberAfEndpointEnableDisable will be called twice, Once

emberAfAttributeChanged(parentEndpointId, Clusters::Descriptor::Id, Clusters::Descriptor::Attributes::PartsList::Id,
and another time
emberAfAttributeChanged(/* endpoint = */ 0, Clusters::Descriptor::Id, Clusters::Descriptor::Attributes::PartsList::Id,

@bzbarsky-apple
Copy link
Contributor

Why is this a problem @chialunl? emberAfAttributeChanged just marks the attribute dirty. That's an idempotent operation, so calling it multiple times in a row for the same attribute is fine.

@bzbarsky-apple
Copy link
Contributor

But also, parentEndpointId shouldn't ever be 0 in that loop, I would think (unless someone has mis-configured their endpoints: parentEndpointId is for listing the parent endpoint if it's not the root node endpoint), so this shouldn't be an issue in practice anyway.

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

2 participants