Skip to content

Commit

Permalink
[OTA] Only supply DelayActionTime field for busy status response (#18912
Browse files Browse the repository at this point in the history
)
  • Loading branch information
carol-apple authored May 28, 2022
1 parent 67a9f1e commit 01a424f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,14 @@ void OTAProviderExample::SendQueryImageResponse(app::CommandHandler * commandObj
}
}

// Delay action time is only applicable when the provider is busy
if (mQueryImageStatus == OTAQueryStatus::kBusy)
{
response.delayedActionTime.Emplace(mDelayedQueryActionTimeSec);
}

// Set remaining fields common to all status types
response.status = mQueryImageStatus;
response.delayedActionTime.Emplace(mDelayedQueryActionTimeSec);
if (mUserConsentNeeded && requestorCanConsent)
{
response.userConsentNeeded.Emplace(true);
Expand Down

0 comments on commit 01a424f

Please sign in to comment.