From 266a10794ff811b40ba5586afe88e34c437037ad Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 12 Dec 2024 21:44:16 -0800 Subject: [PATCH] Update src/controller/CHIPDeviceControllerFactory.cpp Co-authored-by: Boris Zbarsky --- src/controller/CHIPDeviceControllerFactory.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 967acece308810..3d84d0b6b35442 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -252,9 +252,8 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) chip::app::InteractionModelEngine * interactionModelEngine = chip::app::InteractionModelEngine::GetInstance(); - // Calling SetDataModelProvider() initializes the provider and then triggers the - // InitDataModelHandler. As a result, the data model provider will be available - // before InitDataModelHandler is invoked + // Initialize the data model now that everything cluster implementations might + // depend on is initalized. interactionModelEngine->SetDataModelProvider(params.dataModelProvider); ReturnErrorOnFailure(Dnssd::Resolver::Instance().Init(stateParams.udpEndPointManager));