From 92cf41ff12536a6db4ecdc8eb2ab774094d7bf07 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 22 Jun 2022 14:16:15 -0400 Subject: [PATCH] Fix MinInterval handling in ReadClient. (#19854) We had codepaths on which we did not store MinInterval for an outgoing subscribe request, and would later report the wrong MinInterval. --- src/app/ReadClient.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index e77cc5783d8ef0..63a4b95eb96ff1 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -865,7 +865,6 @@ CHIP_ERROR ReadClient::SendSubscribeRequest(const ReadPrepareParams & aReadPrepa { VerifyOrReturnError(aReadPrepareParams.mMinIntervalFloorSeconds <= aReadPrepareParams.mMaxIntervalCeilingSeconds, CHIP_ERROR_INVALID_ARGUMENT); - mMinIntervalFloorSeconds = aReadPrepareParams.mMinIntervalFloorSeconds; return SendSubscribeRequestImpl(aReadPrepareParams); } @@ -873,6 +872,8 @@ CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadP { VerifyOrReturnError(ClientState::Idle == mState, CHIP_ERROR_INCORRECT_STATE); + mMinIntervalFloorSeconds = aReadPrepareParams.mMinIntervalFloorSeconds; + // Todo: Remove the below, Update span in ReadPrepareParams Span attributePaths(aReadPrepareParams.mpAttributePathParamsList, aReadPrepareParams.mAttributePathParamsListSize);