mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 19:27:46 +00:00
[mle] allow appending pending timestamp TLV with zero seconds (#10327)
This commit removes the `GetSeconds() != 0` check in `Mle::AppendPendingTimestampTlv()`. This allows `DatasetUpdater` to use a Pending Timestamp with random ticks and a zero seconds value if there is no pending Dataset.
This commit is contained in:
@@ -93,7 +93,6 @@ Error DatasetUpdater::RequestUpdate(Dataset &aDataset, UpdaterCallback aCallback
|
||||
if (!pendingTimestamp.IsValid())
|
||||
{
|
||||
pendingTimestamp.Clear();
|
||||
pendingTimestamp.SetSeconds(1);
|
||||
}
|
||||
|
||||
pendingTimestamp.AdvanceRandomTicks();
|
||||
|
||||
@@ -4742,7 +4742,7 @@ Error Mle::TxMessage::AppendPendingTimestampTlv(void)
|
||||
Error error = kErrorNone;
|
||||
const MeshCoP::Timestamp ×tamp = Get<MeshCoP::PendingDatasetManager>().GetTimestamp();
|
||||
|
||||
VerifyOrExit(timestamp.IsValid() && timestamp.GetSeconds() != 0);
|
||||
VerifyOrExit(timestamp.IsValid());
|
||||
error = Tlv::Append<PendingTimestampTlv>(*this, timestamp);
|
||||
|
||||
exit:
|
||||
|
||||
Reference in New Issue
Block a user