From 2e94746d7a044ae87ff500d0eb8945609371dd81 Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Tue, 14 May 2024 13:04:10 +0300 Subject: [PATCH] [Telink] use OTATestEventTriggerHandler for OtaSoftwareUpdateRequestor cluster only --- examples/platform/telink/common/src/AppTaskCommon.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 69943a517130d5..5ddf137eb36923 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -269,9 +269,11 @@ CHIP_ERROR AppTaskCommon::InitCommonParts(void) // Init ZCL Data Model and start server static CommonCaseDeviceServerInitParams initParams; static SimpleTestEventTriggerDelegate sTestEventTriggerDelegate{}; - static OTATestEventTriggerHandler sOtaTestEventTriggerHandler{}; VerifyOrDie(sTestEventTriggerDelegate.Init(ByteSpan(sTestEventTriggerEnableKey)) == CHIP_NO_ERROR); +#if CONFIG_CHIP_OTA_REQUESTOR + static OTATestEventTriggerHandler sOtaTestEventTriggerHandler{}; VerifyOrDie(sTestEventTriggerDelegate.AddHandler(&sOtaTestEventTriggerHandler) == CHIP_NO_ERROR); +#endif (void) initParams.InitializeStaticResourcesBeforeServerInit(); initParams.appDelegate = &sCallbacks; initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;