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

New CommissioningComplete code does not ensure there is a working CASE session #9481

Closed
bzbarsky-apple opened this issue Sep 4, 2021 · 2 comments · Fixed by #10000
Closed

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

The DeviceCommissioner::CommissioningComplete function added in #9041 uses GetDevice, not GetConnectedDevice, so does not ensure that there is an actual CASE session to the given node id.

Proposed Solution

Fix that. Though see #9480 about whether this function should exist in the first place.

And maybe rename GetDevice to GetMaybeDisconnectedDevice to make it clearer what it does?

@sweetymhaiske @pan-apple

@sweetymhaiske
Copy link
Contributor

sweetymhaiske commented Sep 6, 2021

@bzbarsky-apple CommissioningComplete function gets called after OperationalDiscoveryComplete function. In OperationalDiscoveryComplete function GetConnectedDevice API is called. Hence CommissioningComplete API will be called only after successful CASE session.

@bzbarsky-apple
Copy link
Contributor Author

CommissioningComplete function gets called after OperationalDiscoveryComplete function

This requirement is not documented in the API documentation for CommissioningComplete, and is relying on implementation details of other functions that might change, no? This is basically a bug waiting to happen.

Though again, this function should not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants