Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tizen] Add missing thread network connected callback (project-chip#184)
Browse files Browse the repository at this point in the history
ravinder-01 committed Oct 27, 2022
1 parent 30e1c7e commit 67393fa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/platform/Tizen/ThreadStackManagerImpl.cpp
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 67393fa

Please sign in to comment.