Skip to content

Commit

Permalink
Fix build breakage from OTA Requestor event support (#13804)
Browse files Browse the repository at this point in the history
This commit failed to update Ota.cpp, resulting in a breakage for
builds that include the OTA shell:

commit d0d6dda
Date:   Thu Jan 20 05:37:01 2022 -0800

    [OTA] Implement event support for OTA Requestor cluster (#13727)

This commit fixes the issue by adding the now necessary version argument
to the NotifyImageHandler shell command.

Fixes #13803
  • Loading branch information
msandstedt authored and pull[bot] committed Nov 14, 2023
1 parent 2c8b16b commit 70614bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/shell/commands/Ota.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,16 @@ CHIP_ERROR ApplyImageHandler(int argc, char ** argv)
CHIP_ERROR NotifyImageHandler(int argc, char ** argv)
{
VerifyOrReturnError(GetRequestorInstance() != nullptr, CHIP_ERROR_INCORRECT_STATE);
VerifyOrReturnError(argc == 3, CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(argc == 4, CHIP_ERROR_INVALID_ARGUMENT);

const FabricIndex fabricIndex = static_cast<FabricIndex>(strtoul(argv[0], nullptr, 10));
const NodeId providerNodeId = static_cast<NodeId>(strtoull(argv[1], nullptr, 10));
const EndpointId providerEndpointId = static_cast<EndpointId>(strtoul(argv[2], nullptr, 10));
const intptr_t version = static_cast<intptr_t>(strtoul(argv[3], nullptr, 10));

GetRequestorInstance()->TestModeSetProviderParameters(providerNodeId, fabricIndex, providerEndpointId);
PlatformMgr().ScheduleWork([](intptr_t) { GetRequestorInstance()->NotifyUpdateApplied(); });
PlatformMgr().ScheduleWork([](intptr_t arg) { GetRequestorInstance()->NotifyUpdateApplied(static_cast<uint32_t>(arg)); },
version);
return CHIP_NO_ERROR;
}

Expand Down

0 comments on commit 70614bb

Please sign in to comment.