-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Darwin] MTRDeviceController should clear attribute cache on pairing start #32549
base: master
Are you sure you want to change the base?
[Darwin] MTRDeviceController should clear attribute cache on pairing start #32549
Conversation
PR #32549: Size comparison from 9a947d8 to 51a600f Decreases (3 builds for efr32)
Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32, telink)
|
@@ -607,6 +608,13 @@ - (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload | |||
error:(NSError * __autoreleasing *)error | |||
{ | |||
auto block = ^BOOL { | |||
// First reset previous information about this new nodeID | |||
os_unfair_lock_lock(&_deviceMapLock); | |||
[self _removeDeviceWithNodeID:newNodeID device:nil]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that the "node ID" in this API is not an actual operational node ID. It does not have to match the operational node ID that the commissionee will get. It's really a "commissioning process handle" or some such...
Some API consumers might have this match actual operational node IDs. Others will not. The latter will be broken by these changes, as far as I can tell.
Changes in this PR:
_pruneEmptyStoredAttributesBranches
method