-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix the check for duplicate endpoints #12934
Fix the check for duplicate endpoints #12934
Conversation
PR #12934: Size comparison from c3572d4 to ff0b1da Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
@@ -183,7 +183,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, EmberAfEn | |||
index = static_cast<uint16_t>(realIndex); | |||
for (uint16_t i = FIXED_ENDPOINT_COUNT; i < MAX_ENDPOINT_COUNT; i++) | |||
{ | |||
if (emAfEndpoints[i].endpoint == id) | |||
if (emAfEndpoints[i].endpoint == id && emAfEndpoints[i].endpointType != NULL) |
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.
It might have been better to change the init code in emberAfEndpointConfigure
to set all the endpoint ids on the non-fixed endpoints to the invalid endpoint id....
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.
Raised a PR for this: #13814
Problem
Change overview
endpointType
, which ensures that it has actually been created.Testing