From 84dec173acf7eec0ab842223fbde3212803ff676 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 12 Apr 2024 10:37:05 -0400 Subject: [PATCH] Apply rename suggestion for unregisterAll...ForEndpoint --- src/app/AttributeAccessInterfaceRegistry.cpp | 2 +- src/app/AttributeAccessInterfaceRegistry.h | 2 +- src/app/util/attribute-storage.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/AttributeAccessInterfaceRegistry.cpp b/src/app/AttributeAccessInterfaceRegistry.cpp index 1fdd25934c8c42..0e97fd91673336 100644 --- a/src/app/AttributeAccessInterfaceRegistry.cpp +++ b/src/app/AttributeAccessInterfaceRegistry.cpp @@ -66,7 +66,7 @@ void unregisterAttributeAccessOverride(AttributeAccessInterface * attrOverride) UnregisterMatchingAttributeAccessInterfaces([attrOverride](AttributeAccessInterface * entry) { return entry == attrOverride; }); } -void unregisterAttributeAccessOverrideForEndpoint(EmberAfDefinedEndpoint * definedEndpoint) +void unregisterAllAttributeAccessOverridesForEndpoint(EmberAfDefinedEndpoint * definedEndpoint) { UnregisterMatchingAttributeAccessInterfaces( [endpoint = definedEndpoint->endpoint](AttributeAccessInterface * entry) { return entry->MatchesEndpoint(endpoint); }); diff --git a/src/app/AttributeAccessInterfaceRegistry.h b/src/app/AttributeAccessInterfaceRegistry.h index 2b2dd2c43717ad..f8452214cbf5f9 100644 --- a/src/app/AttributeAccessInterfaceRegistry.h +++ b/src/app/AttributeAccessInterfaceRegistry.h @@ -40,7 +40,7 @@ void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * att /** * Unregister all attribute access interfaces that match this given endpoint. */ -void unregisterAttributeAccessOverrideForEndpoint(EmberAfDefinedEndpoint * definedEndpoint); +void unregisterAllAttributeAccessOverridesForEndpoint(EmberAfDefinedEndpoint * definedEndpoint); namespace chip { namespace app { diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 774b8703c08730..d154b95cf9ab9e 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -425,7 +425,7 @@ static void shutdownEndpoint(EmberAfDefinedEndpoint * definedEndpoint) // endpoint. chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandlers(definedEndpoint->endpoint); - unregisterAttributeAccessOverrideForEndpoint(definedEndpoint); + unregisterAllAttributeAccessOverridesForEndpoint(definedEndpoint); } // Calls the init functions.