Skip to content

Commit

Permalink
[Tizen] Add missing thread network connected callback (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinder-01 committed Nov 3, 2022
1 parent 6a20783 commit 5c73214
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
Expand Up @@ -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)
Expand Down

0 comments on commit 5c73214

Please sign in to comment.