diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index c7c1428de3fdd2..ffaceaae8bc513 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -305,7 +305,7 @@ CHIP_ERROR InteractionModelEngine::OnReadInitialRequest(Messaging::ExchangeConte { if (!readHandler.IsFree() && readHandler.IsSubscriptionType() && readHandler.GetInitiatorNodeId() == apExchangeContext->GetSessionHandle().GetPeerNodeId() && - readHandler.GetFabricIndex() == apExchangeContext->GetSessionHandle().GetFabricIndex()) + readHandler.GetAccessingFabricIndex() == apExchangeContext->GetSessionHandle().GetFabricIndex()) { bool keepSubscriptions = true; System::PacketBufferTLVReader reader; diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index fd1aa040ff54e5..750ed0eeb05f6a 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -144,7 +144,7 @@ class ReadHandler : public Messaging::ExchangeDelegate void ClearDirty() { mDirty = false; } bool IsDirty() { return mDirty; } NodeId GetInitiatorNodeId() const { return mInitiatorNodeId; } - FabricIndex GetFabricIndex() const { return mFabricIndex; } + FabricIndex GetAccessingFabricIndex() const { return mFabricIndex; } private: friend class TestReadInteraction; diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 13fd1f8bc30853..1661dbc816ad98 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -129,7 +129,7 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu TLV::TLVWriter attributeBackup; attributeReportIBs.Checkpoint(attributeBackup); - err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeReportIBs, readPath); + err = RetrieveClusterData(apReadHandler->GetAccessingFabricIndex(), attributeReportIBs, readPath); if (err != CHIP_NO_ERROR) { // We met a error during writing reports, one common case is we are running out of buffer, rollback the