From a6307a67281ad4fc76d837df4478f95988aff6f3 Mon Sep 17 00:00:00 2001 From: WanqQixiang Date: Wed, 28 Feb 2024 12:11:30 +0800 Subject: [PATCH] ci build fixes --- src/app/SimpleSubscriptionResumptionStorage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/SimpleSubscriptionResumptionStorage.cpp b/src/app/SimpleSubscriptionResumptionStorage.cpp index 208f178093d53d..e233c18af9218a 100644 --- a/src/app/SimpleSubscriptionResumptionStorage.cpp +++ b/src/app/SimpleSubscriptionResumptionStorage.cpp @@ -253,6 +253,7 @@ CHIP_ERROR SimpleSubscriptionResumptionStorage::Load(uint16_t subscriptionIndex, } ReturnErrorOnFailure(reader.ExitContainer(eventsListType)); +#if CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION // If the reader cannot get resumption retries, set it to 0 for subscriptionInfo if (reader.Next(kResumptionRetriesTag) == CHIP_NO_ERROR) { @@ -262,6 +263,7 @@ CHIP_ERROR SimpleSubscriptionResumptionStorage::Load(uint16_t subscriptionIndex, { subscriptionInfo.mResumptionRetries = 0; } +#endif // CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION ReturnErrorOnFailure(reader.ExitContainer(subscriptionContainerType)); @@ -318,8 +320,9 @@ CHIP_ERROR SimpleSubscriptionResumptionStorage::Save(TLV::TLVWriter & writer, Su ReturnErrorOnFailure(writer.EndContainer(eventContainerType)); } ReturnErrorOnFailure(writer.EndContainer(eventsListType)); - +#if CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION ReturnErrorOnFailure(writer.Put(kResumptionRetriesTag, subscriptionInfo.mResumptionRetries)); +#endif // CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION ReturnErrorOnFailure(writer.EndContainer(subscriptionContainerType));