Skip to content

Commit

Permalink
Remove a direct ember call from InteractionModelEngine if data model …
Browse files Browse the repository at this point in the history
…interface is enabled
  • Loading branch information
andreilitvin committed Sep 24, 2024
1 parent d3b645e commit daba1c7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/InteractionModelEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,15 @@ void InteractionModelEngine::RemoveDuplicateConcreteAttributePath(SingleLinkedLi
bool duplicate = false;
// skip all wildcard paths and invalid concrete attribute
if (path1->mValue.IsWildcardPath() ||
!emberAfContainsAttribute(path1->mValue.mEndpointId, path1->mValue.mClusterId, path1->mValue.mAttributeId))
#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE
!GetDataModelProvider()
->GetAttributeInfo(
ConcreteAttributePath(path1->mValue.mEndpointId, path1->mValue.mClusterId, path1->mValue.mAttributeId))
.has_value()
#else
!emberAfContainsAttribute(path1->mValue.mEndpointId, path1->mValue.mClusterId, path1->mValue.mAttributeId)
#endif
)
{
prev = path1;
path1 = path1->mpNext;
Expand Down

0 comments on commit daba1c7

Please # to comment.