-
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 AttributeCache forwarding callback #16566
Fix AttributeCache forwarding callback #16566
Conversation
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.
As a followup, could we add a test to src/app/tests/TestAttributeCache.cpp
that would catch this? Probably adding an OnAttributeData
to CacheValidator
and doing some checks there....
PR #16566: Size comparison from 4a33c98 to f6599d4 Increases (3 builds for linux)
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
f6599d4
to
cee6900
Compare
I added new validator to the test. |
* Fix forwarded OnAttributeData callback losing data by copying the TLV reader before its state changes for cache update.
cee6900
to
df6df13
Compare
PR #16566: Size comparison from 2b7a67e to df6df13 Increases (3 builds for linux)
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
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.
Nice find! I guess when I wrote it, I never had quite tested folks actually using the OnAttributeData
if they're using the cache...
* Fix forwarded OnAttributeData callback losing data by copying the TLV reader before its state changes for cache update.
Problem
Change overview
copying the TLV reader before its state changes for cache update.
Testing