-
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
Refactor SessionHandle #13330
Refactor SessionHandle #13330
Conversation
…sage and does not seem to be utilized at least for matter builds
@doru91 - I have patched the NXP SDK to remove the 'define global' as I have not seen its usage and it seems that for matter it is somewhat common to patch the NXP SDK. Please take a look and see if there is a better approach. |
PR #13330: Size comparison from 36a759d to 0d5d03e Increases above 0.2%:
Increases (2 builds for linux)
Decreases (3 builds for qpg, telink)
Full report (6 builds for linux, qpg, telink)
|
PR #13330: Size comparison from 36a759d to 4c7c2d7 Increases above 0.2%:
Increases (2 builds for linux)
Decreases (11 builds for efr32, k32w, p6, qpg, telink)
Full report (14 builds for efr32, k32w, linux, p6, qpg, telink)
|
The pull requests project-chip#13330 and project-chip#13377 were merged around the same time, and have caused a small build breakage. This fixes it.
@andy31415 the fix is good to me. I also like the way you've chosen to patch only the required lines instead of copying the entire file (as is done in the existing script file). |
* Fix EPS32 build warning * app/ReadPrepareParams: store SessionHolder instead of SessionHandle * Refactor SessionHandle * Fix GetFabricIndex/GetPeerNodeId calls in general commissioning server * Fix usage of . instead of -> (tested with esp32 compile) * Remove the define of global for nxp compilation: conflicts with STL usage and does not seem to be utilized at least for matter builds * Restyle fixes * Fix getting peer address compilation for exchange context Co-authored-by: Andrei Litvin <[email protected]>
…ject-chip#13382) The pull requests project-chip#13330 and project-chip#13377 were merged around the same time, and have caused a small build breakage. This fixes it.
Problem
Make session easy to use and managable
Change overview
SessionHandle
GetSubjectDescriptor
,GetPeerAddress
,GetMRPConfig
are virtual now, and their implementations are pushed down.SessionHolder
SessionHolder
is used to store a session.SessionHolder
will clear itself when the session is released.SessionHolderWithDelegate
can be used to receiveOnSessionReleased
event.Testing
This is a refactor. Verified by unit-tests.
Note: this PR is pretty big, I have tried to split it into multiple PRs, The final part appears coupling sticky, and it is quite hard to tear it down any further. But fortunately, the changes are pretty straightforward, and couldn't be hard to review.