Skip to content

Commit

Permalink
Rename ReadHandler::GetFabricIndex to GetAccessingFabricIndex. (#12043)
Browse files Browse the repository at this point in the history
Makes it clearer which of the fabric indices it is.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Mar 2, 2022
1 parent ee893fc commit 2640233
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/InteractionModelEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/app/ReadHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/app/reporting/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2640233

Please sign in to comment.