[dataset] use full Timestamp TLV value in otOperationalDataset (#7739)

The `otOperationalDataset#mActiveTimestamp` should represent the full
Active Timestamp TLV value but not only the seconds. The same for
`otOperationalDataset#mPendingTimestamp`.
This commit is contained in:
Kangping
2022-06-03 10:59:16 -07:00
committed by GitHub
parent c8556dfd66
commit 5daca7c684
12 changed files with 150 additions and 52 deletions
+2 -1
View File
@@ -139,7 +139,7 @@ void TestTimestamp(void)
VerifyOrQuit(MeshCoP::Timestamp::Compare(&t1, &t2) == 0);
t1.SetAuthoritative(true);
VerifyOrQuit(MeshCoP::Timestamp::Compare(&t1, &t2) == 0);
VerifyOrQuit(MeshCoP::Timestamp::Compare(&t1, &t2) > 0);
t1.SetSeconds(1);
VerifyOrQuit(t1.GetSeconds() == 1);
@@ -147,6 +147,7 @@ void TestTimestamp(void)
VerifyOrQuit(MeshCoP::Timestamp::Compare(&t2, &t1) < 0);
t2.SetSeconds(1);
t2.SetAuthoritative(true);
VerifyOrQuit(MeshCoP::Timestamp::Compare(&t1, &t2) == 0);
printf("TestTimestamp() passed\n");