[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:
Abtin Keshavarzian
2024-06-04 15:45:32 -07:00
committed by GitHub
parent fcd3c5c4b7
commit b5b17ba396
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -93,7 +93,6 @@ Error DatasetUpdater::RequestUpdate(Dataset &aDataset, UpdaterCallback aCallback
if (!pendingTimestamp.IsValid())
{
pendingTimestamp.Clear();
pendingTimestamp.SetSeconds(1);
}
pendingTimestamp.AdvanceRandomTicks();
+1 -1
View File
@@ -4742,7 +4742,7 @@ Error Mle::TxMessage::AppendPendingTimestampTlv(void)
Error error = kErrorNone;
const MeshCoP::Timestamp &timestamp = Get<MeshCoP::PendingDatasetManager>().GetTimestamp();
VerifyOrExit(timestamp.IsValid() && timestamp.GetSeconds() != 0);
VerifyOrExit(timestamp.IsValid());
error = Tlv::Append<PendingTimestampTlv>(*this, timestamp);
exit: