Skip to content

Commit

Permalink
Fix MinInterval handling in ReadClient. (#19854)
Browse files Browse the repository at this point in the history
We had codepaths on which we did not store MinInterval for an outgoing
subscribe request, and would later report the wrong MinInterval.
  • Loading branch information
bzbarsky-apple authored Jun 22, 2022
1 parent 7959bfc commit 92cf41f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/ReadClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,14 +865,15 @@ CHIP_ERROR ReadClient::SendSubscribeRequest(const ReadPrepareParams & aReadPrepa
{
VerifyOrReturnError(aReadPrepareParams.mMinIntervalFloorSeconds <= aReadPrepareParams.mMaxIntervalCeilingSeconds,
CHIP_ERROR_INVALID_ARGUMENT);
mMinIntervalFloorSeconds = aReadPrepareParams.mMinIntervalFloorSeconds;
return SendSubscribeRequestImpl(aReadPrepareParams);
}

CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadPrepareParams)
{
VerifyOrReturnError(ClientState::Idle == mState, CHIP_ERROR_INCORRECT_STATE);

mMinIntervalFloorSeconds = aReadPrepareParams.mMinIntervalFloorSeconds;

// Todo: Remove the below, Update span in ReadPrepareParams
Span<AttributePathParams> attributePaths(aReadPrepareParams.mpAttributePathParamsList,
aReadPrepareParams.mAttributePathParamsListSize);
Expand Down

0 comments on commit 92cf41f

Please sign in to comment.