Skip to content

Commit

Permalink
[OTA] Only supply DelayActionTime field for busy status response
Browse files Browse the repository at this point in the history
  • Loading branch information
carol-apple committed May 27, 2022
1 parent 67a9f1e commit b22f7c6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,13 @@ 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 b22f7c6

Please sign in to comment.