mirror of
https://github.com/espressif/openthread.git
synced 2026-09-17 06:30:10 +00:00
[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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user