Skip to content

Commit c02a091

Browse files
[Tizen] Add ifdef for version-dependent Thread API (#37430)
* Add ifdef * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 1348a8a commit c02a091

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/platform/Tizen/ThreadStackManagerImpl.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,15 @@ CHIP_ERROR ThreadStackManagerImpl::_GetThreadVersion(uint16_t & version)
521521
{
522522
VerifyOrReturnError(mIsInitialized, CHIP_ERROR_UNINITIALIZED);
523523

524+
#if defined(TIZEN_NETWORK_THREAD_VERSION) && TIZEN_NETWORK_THREAD_VERSION >= 0x000900
524525
int threadErr = thread_get_version(mThreadInstance, &version);
525526
VerifyOrReturnError(threadErr == THREAD_ERROR_NONE, TizenToChipError(threadErr),
526527
ChipLogError(DeviceLayer, "FAIL: Get thread version: %s", get_error_message(threadErr)));
527-
528528
ChipLogProgress(DeviceLayer, "Thread version [%u]", version);
529529
return CHIP_NO_ERROR;
530+
#else
531+
return CHIP_ERROR_NOT_IMPLEMENTED;
532+
#endif
530533
}
531534

532535
CHIP_ERROR ThreadStackManagerImpl::_GetPollPeriod(uint32_t & buf)

0 commit comments

Comments
 (0)