From 10215401552e5e4ef0aa7df2470bcf6838c2cdb3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 22 Nov 2021 09:34:36 -0500 Subject: [PATCH] Rename ReadHandler::GetFabricIndex to GetAccessingFabricIndex. (#12043) Makes it clearer which of the fabric indices it is. --- src/app/InteractionModelEngine.cpp | 2 +- src/app/ReadHandler.h | 2 +- src/app/reporting/Engine.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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