Skip to content

Commit 73c46b6

Browse files
committed
Merge branch 'server_cluster_registry' of github.com:andy31415/connectedhomeip into server_cluster_registry
2 parents af23a93 + 4ea82ec commit 73c46b6

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/app/server-cluster/ServerClusterInterface.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ServerClusterInterface
4444

4545
///////////////////////////////////// Cluster Metadata Support //////////////////////////////////////////////////
4646

47-
/// The path where this cluster operates on.
47+
/// The path to this cluster instance.
4848
///
4949
/// This path (endpointid,clusterid) is expected to be fixed once the server
5050
/// cluster interface is in use.

src/data-model-providers/codegen/ServerClusterInterfaceRegistry.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ ServerClusterInterface * ServerClusterInterfaceRegistry::Unregister(const Concre
8383
mCachedInterface = nullptr;
8484
}
8585

86-
current->next = nullptr; // some clearing
86+
current->next = nullptr; // Make sure current does not look like part of a list.
8787
return current->serverClusterInterface;
8888
}
8989

@@ -121,7 +121,7 @@ void ServerClusterInterfaceRegistry::UnregisterAllFromEndpoint(EndpointId endpoi
121121
prev->next = current->next;
122122
}
123123
ServerClusterRegistration * actual_next = current->next;
124-
current->next = nullptr; // some clearing
124+
current->next = nullptr; // Make sure current does not look like part of a list.
125125
current = actual_next;
126126
}
127127
else

src/data-model-providers/codegen/ServerClusterInterfaceRegistry.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ namespace app {
3131
struct ServerClusterRegistration
3232
{
3333
// A single-linked list of clusters registered for the given `endpointId`
34-
ServerClusterInterface * serverClusterInterface;
34+
ServerClusterInterface * const serverClusterInterface;
3535
ServerClusterRegistration * next;
3636

3737
constexpr ServerClusterRegistration(ServerClusterInterface &interface, ServerClusterRegistration * next_item = nullptr) :
3838
serverClusterInterface(&interface), next(next_item)
3939
{}
4040
ServerClusterRegistration(ServerClusterRegistration &&other) = default;
41-
ServerClusterRegistration& operator=(ServerClusterRegistration &&other) = default;
4241

4342
// we generally do not want to allow copies as those may have different "next" entries.
4443
ServerClusterRegistration(const ServerClusterRegistration &other) = delete;
@@ -118,7 +117,7 @@ class ServerClusterInterfaceRegistry
118117

119118
/// Provides a list of clusters that are registered for the given endpoint.
120119
///
121-
/// As ClustersList points inside the internal registrations of the registry,
120+
/// ClustersList points inside the internal registrations of the registry, so
122121
/// the list is only valid as long as the registry is not modified.
123122
ClustersList ClustersOnEndpoint(EndpointId endpointId);
124123

0 commit comments

Comments
 (0)