From 5c73214d5608c6394009b8bc98c806292885a50b Mon Sep 17 00:00:00 2001 From: "ravinder.01@samsung.com" Date: Thu, 29 Sep 2022 14:31:46 +0530 Subject: [PATCH] [Tizen] Add missing thread network connected callback (#184) --- src/platform/Tizen/ThreadStackManagerImpl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/platform/Tizen/ThreadStackManagerImpl.cpp b/src/platform/Tizen/ThreadStackManagerImpl.cpp index b8e8322640dea8..0af8c5862733ee 100644 --- a/src/platform/Tizen/ThreadStackManagerImpl.cpp +++ b/src/platform/Tizen/ThreadStackManagerImpl.cpp @@ -294,6 +294,17 @@ CHIP_ERROR ThreadStackManagerImpl::_SetThreadEnabled(bool val) VerifyOrExit(threadErr == THREAD_ERROR_NONE, ChipLogError(DeviceLayer, "FAIL: attach thread network")); threadErr = thread_start(mThreadInstance); + DeviceLayer::SystemLayer().ScheduleLambda([&, threadErr]() { + if (this->mpConnectCallback != nullptr) + { + this->mpConnectCallback->OnResult( + threadErr == THREAD_ERROR_NONE ? + NetworkCommissioning::Status::kSuccess : + NetworkCommissioning::Status::kUnknownError, + CharSpan(), 0); + this->mpConnectCallback = nullptr; + } + }); VerifyOrExit(threadErr == THREAD_ERROR_NONE, ChipLogError(DeviceLayer, "FAIL: start thread network")); } else if (!val && isEnabled)