diff --git a/src/lib/shell/commands/Ota.cpp b/src/lib/shell/commands/Ota.cpp index 3d0d7ba64338c5..48414fbf138cac 100644 --- a/src/lib/shell/commands/Ota.cpp +++ b/src/lib/shell/commands/Ota.cpp @@ -62,14 +62,15 @@ 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(strtoul(argv[0], nullptr, 10)); const NodeId providerNodeId = static_cast(strtoull(argv[1], nullptr, 10)); const EndpointId providerEndpointId = static_cast(strtoul(argv[2], nullptr, 10)); + const intptr_t version = static_cast(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(arg)); }, version); return CHIP_NO_ERROR; }