Added sample cpp and header files#4
Merged
Conversation
silabs-ArghyaD
pushed a commit
that referenced
this pull request
Oct 16, 2025
* Fix ActiveTCPConnectionState being leaked when CASE connections are closed (e.g. via ExpireAllSessionsOnLogicalFabric) * Support multiple connections to same peer by sharing a single TCP socket * Unit test with multiple connections, to simulate SessionManager * Use automatic ref-counting throughout; limit visibility of explicit ref/deref * Address review comments from https://github.com/project-chip/connectedhomeip/pull/40817/files * Address review comments from https://github.com/project-chip/connectedhomeip/pull/40817/files * Additional review comments & fixes * Check for invalid nullptr input * * Tighten/hide usage of ref-counting internals, using new method names to catch wrong usages of manual ref counting * Use a consistent Free() for all inet connections which does clean-up such as closing the connections before freeing memory back to pool * Apply clang tidy suggestions * Apply review suggestions * Undo simplification; this was likely intended to force memory allocation on the matter thread * Apply review suggestions * Go back to using && and std::move as previous impl did (EndPointHandle now has a move operator/ctor) * Make call to HandleAcceptError explicit, as that's all we're doing anyway, and set mAppState Remove unnecessary initialization as it's now done @ top of method Fixes CI failure: ==68889==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000030 (pc 0x000104884514 bp 0x00016b642490 sp 0x00016b642410 T0) ==68889==The signal is caused by a READ memory access. ==68889==Hint: address points to the zero page. #0 0x104884514 in chip::Transport::TCPBase::FindActiveConnection(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&) TCP.cpp:205 #1 0x1048826a8 in chip::Transport::TCPBase::HandleAcceptError(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::ChipError) TCP.cpp:664 #2 0x10488181c in chip::Transport::TCPBase::HandleIncomingConnection(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::Inet::IPAddress const&, unsigned short) TCP.cpp:623 #3 0x1048b3328 in chip::Inet::TCPEndPointImplSockets::HandleIncomingConnection() TCPEndPointImplSockets.cpp:1066 #4 0x1048b13ac in chip::Inet::TCPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) TCPEndPointImplSockets.cpp:797 #5 0x1048a96a8 in chip::Inet::TCPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) TCPEndPointImplSockets.cpp:783 #6 0x10493f870 in chip::System::LayerImplDispatch::SocketWatch::HandleEvents(chip::System::LayerImplDispatch::SelectSets const&) const SystemLayerImplDispatchSockets.mm:245 #7 0x10493e800 in chip::System::LayerImplDispatch::SocketWatchPool::HandleEvents(chip::System::LayerImplDispatch::SelectSets const&) const SystemLayerImplDispatchSockets.mm:204 #8 0x10493df84 in chip::System::LayerImplDispatch::HandleSocketsAndTimerEvents(std::__1::chrono::duration<unsigned int, std::__1::ratio<1l, 1000l>>) SystemLayerImplDispatchSockets.mm:172 #9 0x104930e28 in chip::System::LayerImplDispatch::HandleDispatchQueueEvents(std::__1::chrono::duration<unsigned int, std::__1::ratio<1l, 1000l>>) SystemLayerImplDispatch.mm:298 * Fix errors merging to head * Apply code review suggestion
silabs-ArghyaD
pushed a commit
that referenced
this pull request
Oct 16, 2025
* [NXP] enable mbedtls 3.x for mcxw72 (#41443) * [NXP][cmake][mcxw72] Enable Mbedtls 3.x Signed-off-by: Marius Preda <marius.preda@nxp.com> * Update nxp submodules Signed-off-by: Martin Girardot <martin.girardot@nxp.com> * Restyled by clang-format * Fix PR comment Signed-off-by: Martin Girardot <martin.girardot@nxp.com> * Restyled by clang-format --------- Signed-off-by: Marius Preda <marius.preda@nxp.com> Signed-off-by: Martin Girardot <martin.girardot@nxp.com> Co-authored-by: Marius Preda <marius.preda@nxp.com> Co-authored-by: Restyled.io <commits@restyled.io> * Generate TimeSync cluster using Alchemy (#41446) * [Realtek] add CONFIG_DAC_KEY_ENC (#41421) * [Realtek] add CONFIG_DAC_KEY_ENC * [Realtek] Improve code maintainability * Add more unit tests for `SoftwareDiagnostics` cluster (#41246) * Test `ResetWatermarks` command execution. * Add event generation testing (kindof) * Add comments * Add event generation testing for `SoftwareDiagnosticsCluster` * Add a `GetProvider` function to `ScopedDiagnosticsProvider` and small fixes * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Use `strlen` instead of `sizeof` * Shutdown the cluster --------- Co-authored-by: Restyled.io <commits@restyled.io> * Bump third_party/imgui/repo from `ee3d16f` to `5af650f` (#41435) Bumps [third_party/imgui/repo](https://github.com/ocornut/imgui) from `ee3d16f` to `5af650f`. - [Release notes](https://github.com/ocornut/imgui/releases) - [Commits](ocornut/imgui@ee3d16f...5af650f) --- updated-dependencies: - dependency-name: third_party/imgui/repo dependency-version: 5af650fc6d27daf585edbd9ac872465f756a65e9 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump third_party/simw-top-mini/repo from `5c42397` to `d712a48` (#41432) Bumps [third_party/simw-top-mini/repo](https://github.com/NXP/plug-and-trust) from `5c42397` to `d712a48`. - [Release notes](https://github.com/NXP/plug-and-trust/releases) - [Commits](NXP/plug-and-trust@5c42397...d712a48) --- updated-dependencies: - dependency-name: third_party/simw-top-mini/repo dependency-version: d712a48071b0efe437786851fbe63aaaa913cd72 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump third_party/libwebsockets/repo from `388b1d3` to `edc6a44` (#41434) Bumps [third_party/libwebsockets/repo](https://github.com/warmcat/libwebsockets) from `388b1d3` to `edc6a44`. - [Commits](warmcat/libwebsockets@388b1d3...edc6a44) --- updated-dependencies: - dependency-name: third_party/libwebsockets/repo dependency-version: edc6a44ea2f779a7291b8b155a2152cfd05ba863 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump third_party/ot-br-posix/repo from `eb30645` to `e9b1f3c` (#41431) Bumps [third_party/ot-br-posix/repo](https://github.com/openthread/ot-br-posix) from `eb30645` to `e9b1f3c`. - [Release notes](https://github.com/openthread/ot-br-posix/releases) - [Commits](openthread/ot-br-posix@eb30645...e9b1f3c) --- updated-dependencies: - dependency-name: third_party/ot-br-posix/repo dependency-version: e9b1f3c3d93eb104c1f3ad6fc1785dd185256061 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [NXP] Ensuring that Python always uses UTF-8 encoding when invoked from CMakeLists.txt (#41445) This change addresses potential parsing issues that can occur in environments where the system's default encoding differs from UTF-8. Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * Revert "Parallelize submodule checkout (#41335)" (#41425) This reverts commit 82e6d0e. Signed-off-by: Maciej Grela <enki@fsck.pl> * Various AccessControl cluster cleanups: (#41420) * Remove redundant namespace prefixes that are covered by existing "using". * Fix references to "logging" or "sending" events to talk about generating them. * Consistently use kRootEndpointId for events. * Migrate Localization Configuration cluster to be code driven (#40717) * [Localization Configuration]: Migrate Localization Configuration cluster to be code driven. * Update zap and regen * Restyler * Removed redundent destroy. * Update API return type and documentation. * Add an api to set default locale. * Remove separate logic files, add some error handeling. * Move FeatureMap and ClusterRevision to external and zap regen * Use new integration with error handeling. * Zap regen * Fix build * Fix CI * Fix conflicts * Use RAII and update error return. * rebase * Bump github/codeql-action from 3 to 4 (#41433) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v3...v4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [Ameba] Update docker image (#41303) * Updated the guides for code driven writing_clusters (#41409) * Updated the guides for code driven writing_clusters - More checkmark-list for migration (easier to follow) - Added details for EventInfo and layout/design - Overall readability updates * Self-review: wording update * Add guidance on PRs for easy review. * More details on the renames. * Restyle. * Remove line split on strings (#41449) * Remove line split on strings * Trying to get past the Restyler * More Restyler faking out * Restyler * Generate PowerTopology cluster with Alchemy (#41388) * Groupcast cluster server skeleton. (#41132) * Groupcast cluster server skeleton. * Code review. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Address issue#41311 (#41415) * Followup to TCP changes in pr/40817 (#40904) * Fix ActiveTCPConnectionState being leaked when CASE connections are closed (e.g. via ExpireAllSessionsOnLogicalFabric) * Support multiple connections to same peer by sharing a single TCP socket * Unit test with multiple connections, to simulate SessionManager * Use automatic ref-counting throughout; limit visibility of explicit ref/deref * Address review comments from https://github.com/project-chip/connectedhomeip/pull/40817/files * Address review comments from https://github.com/project-chip/connectedhomeip/pull/40817/files * Additional review comments & fixes * Check for invalid nullptr input * * Tighten/hide usage of ref-counting internals, using new method names to catch wrong usages of manual ref counting * Use a consistent Free() for all inet connections which does clean-up such as closing the connections before freeing memory back to pool * Apply clang tidy suggestions * Apply review suggestions * Undo simplification; this was likely intended to force memory allocation on the matter thread * Apply review suggestions * Go back to using && and std::move as previous impl did (EndPointHandle now has a move operator/ctor) * Make call to HandleAcceptError explicit, as that's all we're doing anyway, and set mAppState Remove unnecessary initialization as it's now done @ top of method Fixes CI failure: ==68889==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000030 (pc 0x000104884514 bp 0x00016b642490 sp 0x00016b642410 T0) ==68889==The signal is caused by a READ memory access. ==68889==Hint: address points to the zero page. #0 0x104884514 in chip::Transport::TCPBase::FindActiveConnection(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&) TCP.cpp:205 #1 0x1048826a8 in chip::Transport::TCPBase::HandleAcceptError(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::ChipError) TCP.cpp:664 #2 0x10488181c in chip::Transport::TCPBase::HandleIncomingConnection(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::Inet::IPAddress const&, unsigned short) TCP.cpp:623 #3 0x1048b3328 in chip::Inet::TCPEndPointImplSockets::HandleIncomingConnection() TCPEndPointImplSockets.cpp:1066 #4 0x1048b13ac in chip::Inet::TCPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) TCPEndPointImplSockets.cpp:797 #5 0x1048a96a8 in chip::Inet::TCPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) TCPEndPointImplSockets.cpp:783 #6 0x10493f870 in chip::System::LayerImplDispatch::SocketWatch::HandleEvents(chip::System::LayerImplDispatch::SelectSets const&) const SystemLayerImplDispatchSockets.mm:245 #7 0x10493e800 in chip::System::LayerImplDispatch::SocketWatchPool::HandleEvents(chip::System::LayerImplDispatch::SelectSets const&) const SystemLayerImplDispatchSockets.mm:204 #8 0x10493df84 in chip::System::LayerImplDispatch::HandleSocketsAndTimerEvents(std::__1::chrono::duration<unsigned int, std::__1::ratio<1l, 1000l>>) SystemLayerImplDispatchSockets.mm:172 #9 0x104930e28 in chip::System::LayerImplDispatch::HandleDispatchQueueEvents(std::__1::chrono::duration<unsigned int, std::__1::ratio<1l, 1000l>>) SystemLayerImplDispatch.mm:298 * Fix errors merging to head * Apply code review suggestion * binding: move bind cluster structures and classes namespace to chip::app::Clusters and add accessingFabricIndex parameter for ListAttributeWriteNotification (#41423) * binding: move bind cluster namespace * Update examples/light-switch-app/infineon/cyw30739/src/AppShellCommands.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * typo fix * Restyled by clang-format * reserve ForNode and ForGroup functions for Binding::TableEntry * Restyled by clang-format --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io> * Generate ICDManagement cluster with Alchemy (#41353) * ACL Extension Event fix (#41454) * Removed ACL Extension event from data models where ACL extension feature is not enabled, regenerated .matter files * reverted the m5 stack submodule * Darwin: Expose MTRSetupPayload subPayloads and concatenated properties (#41450) * Darwin: Expose MTRSetupPayload subPayloads and concatenated properties Re-generate the qrCodeString from the actual sub-payloads on demand. This means sub-payloads can be mutated without requiring special handling or API. Attempting to mutate a concatenated payload object as if it wasn't concatenated drops the subsequent payloads, i.e. legacy code that is unaware of concatenated codes (but uses MTRSetupPayload in a mutable way) will simply work on the first payload. Expand the tests for concatenated codes. * restyle * Update src/darwin/Framework/CHIP/MTRSetupPayload.mm Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> * Update src/darwin/Framework/CHIP/MTRSetupPayload.h Co-authored-by: terafin <jwood@me.com> * Update src/darwin/Framework/CHIP/MTRSetupPayload.h Co-authored-by: terafin <jwood@me.com> * Apply suggestion from @woody-apple * Apply suggestion from @woody-apple --------- Co-authored-by: Justin Wood <woody@apple.com> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> Co-authored-by: terafin <jwood@me.com> * [SL-ONLY] Regenerate ZAP files for Silabs apps --------- Signed-off-by: Marius Preda <marius.preda@nxp.com> Signed-off-by: Martin Girardot <martin.girardot@nxp.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> Signed-off-by: Maciej Grela <enki@fsck.pl> Co-authored-by: Martin Girardot <165289184+Martin-NXP@users.noreply.github.com> Co-authored-by: Marius Preda <marius.preda@nxp.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Moises Terrones <moises.tersal@gmail.com> Co-authored-by: Realtek-pankore <86098180+pankore@users.noreply.github.com> Co-authored-by: Hayk Khachatryan <69189182+Hayk10002@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gatien Chapon <43855183+chapongatien@users.noreply.github.com> Co-authored-by: Maciej Grela <enki@fsck.pl> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> Co-authored-by: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Co-authored-by: Andrei Litvin <andy314@gmail.com> Co-authored-by: marktrayer <m.trayer@samsung.com> Co-authored-by: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Marcos B <15697303+gmarcosb@users.noreply.github.com> Co-authored-by: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Co-authored-by: Justin Wood <woody@apple.com> Co-authored-by: terafin <jwood@me.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
silabs-ArghyaD
pushed a commit
that referenced
this pull request
Dec 4, 2025
* Batch #4 nodiscard errors: non-clusters app code * Fix clang
silabs-ArghyaD
pushed a commit
that referenced
this pull request
Feb 9, 2026
* Batch #4 nodiscard errors: non-clusters app code * Fix clang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sample PR - Added sample cpp and header files
Related issues
N/A
Testing
N/A
Readability checklist
The checklist below will help the reviewer finish PR review in time and keep the
code readable:
descriptive
“When in Rome…”
rule (coding style)
See: Pull Request Guidelines