Skip to content

Commit

Permalink
Stop getting a subject descriptor from a gone-async command in Darwin…
Browse files Browse the repository at this point in the history
… OTA.
  • Loading branch information
bzbarsky-apple committed Mar 24, 2023
1 parent 7326cf8 commit 073b4b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath
return;
}

auto fabricIndex = commandObj->GetAccessingFabricIndex();

auto * commandParams = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init];
CHIP_ERROR err = ConvertToQueryImageParams(commandData, commandParams);
if (err != CHIP_NO_ERROR) {
Expand Down Expand Up @@ -666,8 +668,6 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath
}

// If there is an update available, try to prepare for a transfer.
auto fabricIndex = handler->GetSubjectDescriptor().fabricIndex;
auto nodeId = handler->GetSubjectDescriptor().subject;
CHIP_ERROR err = gOtaSender.PrepareForTransfer(fabricIndex, nodeId);
if (CHIP_NO_ERROR != err) {

Expand Down

0 comments on commit 073b4b8

Please sign in to comment.