From 6b99092479c2e3b3582520fe05f93b6b70c26a04 Mon Sep 17 00:00:00 2001 From: Arkadiusz Balys Date: Wed, 13 Jul 2022 14:27:28 +0200 Subject: [PATCH] Set DeviceInstanceInfoProvider to the platform implementation. In the #19514 there was a mistake made. Within some platforms, the DeviceInstanceInfoProvider was set to a generic one instead of the platform implementation. To resolve this issue, the DeviceInstanceInfoProvider has been set to the proper one in PlatformManager implementation for Android, Darwin, Linux, Tizen, and WebOS. --- src/platform/Darwin/PlatformManagerImpl.cpp | 3 +++ src/platform/Linux/PlatformManagerImpl.cpp | 3 +++ src/platform/Tizen/PlatformManagerImpl.cpp | 3 +++ src/platform/android/PlatformManagerImpl.cpp | 3 +++ src/platform/webos/PlatformManagerImpl.cpp | 3 +++ 5 files changed, 15 insertions(+) diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index 1a80645a0192c1..00e63fb88c6d22 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -24,7 +24,9 @@ #include +#include #include +#include #include // Include the non-inline definitions for the GenericPlatformManagerImpl<> template, @@ -48,6 +50,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() #endif // CHIP_DISABLE_PLATFORM_KVS SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance()); + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); mRunLoopSem = dispatch_semaphore_create(0); diff --git a/src/platform/Linux/PlatformManagerImpl.cpp b/src/platform/Linux/PlatformManagerImpl.cpp index 2aa464bb07c2f6..1bd7de58e2db2d 100644 --- a/src/platform/Linux/PlatformManagerImpl.cpp +++ b/src/platform/Linux/PlatformManagerImpl.cpp @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include #include @@ -175,6 +177,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() ReturnErrorOnFailure(Internal::PosixConfig::Init()); SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance()); + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. diff --git a/src/platform/Tizen/PlatformManagerImpl.cpp b/src/platform/Tizen/PlatformManagerImpl.cpp index 87b9a36201bad4..78ee755146680c 100644 --- a/src/platform/Tizen/PlatformManagerImpl.cpp +++ b/src/platform/Tizen/PlatformManagerImpl.cpp @@ -25,7 +25,9 @@ #include +#include #include +#include #include #include @@ -39,6 +41,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) ReturnErrorOnFailure(Internal::PosixConfig::Init()); SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance()); + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); return Internal::GenericPlatformManagerImpl_POSIX::_InitChipStack(); } diff --git a/src/platform/android/PlatformManagerImpl.cpp b/src/platform/android/PlatformManagerImpl.cpp index 44ebf7af8594ee..a6bc9ddf86c58b 100644 --- a/src/platform/android/PlatformManagerImpl.cpp +++ b/src/platform/android/PlatformManagerImpl.cpp @@ -26,7 +26,9 @@ #include #include +#include #include +#include #include #include @@ -46,6 +48,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() SuccessOrExit(err); SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance()); + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. diff --git a/src/platform/webos/PlatformManagerImpl.cpp b/src/platform/webos/PlatformManagerImpl.cpp index 92be732d7ec4eb..c2e6845368aeb9 100644 --- a/src/platform/webos/PlatformManagerImpl.cpp +++ b/src/platform/webos/PlatformManagerImpl.cpp @@ -29,9 +29,11 @@ #include #include #include +#include #include #include #include +#include #include #include @@ -166,6 +168,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance()); SetDeviceInfoProvider(&DeviceInfoProviderImpl::GetDefaultInstance()); + SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process.