From 8812980fd41d0f2467d01b88ac3ab558b9ba5449 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 24 Jun 2022 20:28:47 -0700 Subject: [PATCH] submodule: bump third_party/openthread/repo from `130afd9` to `f4c2233` (#19961) --- .../GenericThreadStackManagerImpl_OpenThread.cpp | 16 +++++++++++++--- third_party/openthread/repo | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index d48a5ac5000105..9f88f4364d82ef 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -1492,8 +1492,13 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_WriteThreadNetw otOperationalDataset activeDataset; otError otErr = otDatasetGetActive(mOTInst, &activeDataset); VerifyOrExit(otErr == OT_ERROR_NONE, err = MapOpenThreadError(otErr)); - uint64_t activeTimestamp = activeDataset.mPendingTimestamp; - err = encoder.Encode(activeTimestamp); +#if OPENTHREAD_API_VERSION >= 219 + uint64_t activeTimestamp = (activeDataset.mActiveTimestamp.mSeconds << 16) | + (activeDataset.mActiveTimestamp.mTicks << 1) | activeDataset.mActiveTimestamp.mAuthoritative; +#else + uint64_t activeTimestamp = activeDataset.mActiveTimestamp; +#endif + err = encoder.Encode(activeTimestamp); } } break; @@ -1505,8 +1510,13 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_WriteThreadNetw otOperationalDataset activeDataset; otError otErr = otDatasetGetActive(mOTInst, &activeDataset); VerifyOrExit(otErr == OT_ERROR_NONE, err = MapOpenThreadError(otErr)); +#if OPENTHREAD_API_VERSION >= 219 + uint64_t pendingTimestamp = (activeDataset.mPendingTimestamp.mSeconds << 16) | + (activeDataset.mPendingTimestamp.mTicks << 1) | activeDataset.mPendingTimestamp.mAuthoritative; +#else uint64_t pendingTimestamp = activeDataset.mPendingTimestamp; - err = encoder.Encode(pendingTimestamp); +#endif + err = encoder.Encode(pendingTimestamp); } } break; diff --git a/third_party/openthread/repo b/third_party/openthread/repo index 130afd9bb6d02f..f4c223352789fb 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit 130afd9bb6d02f2a07e86b824fb7a79e9fca5fe0 +Subproject commit f4c223352789fbe353744a549d0c5103fadbfcf8