Init Timestamp within Active/PendingTimestamp TLVs. (#849)

This commit is contained in:
Jonathan Hui
2016-10-20 12:26:09 -07:00
committed by GitHub
parent 87211f4168
commit 871a1565d8
2 changed files with 12 additions and 4 deletions
+2 -2
View File
@@ -942,7 +942,7 @@ public:
* This method initializes the TLV.
*
*/
void Init(void) { SetType(kActiveTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); }
void Init(void) { SetType(kActiveTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); Timestamp::Init(); }
/**
* This method indicates whether or not the TLV appears to be well-formed.
@@ -1192,7 +1192,7 @@ public:
* This method initializes the TLV.
*
*/
void Init(void) { SetType(kPendingTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); }
void Init(void) { SetType(kPendingTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); Timestamp::Init(); }
/**
* This method indicates whether or not the TLV appears to be well-formed.
+10 -2
View File
@@ -1567,7 +1567,11 @@ public:
* This method initializes the TLV.
*
*/
void Init(void) { SetType(Mle::Tlv::kActiveTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); }
void Init(void) {
SetType(Mle::Tlv::kActiveTimestamp);
SetLength(sizeof(*this) - sizeof(Tlv));
Timestamp::Init();
}
/**
* This method indicates whether or not the TLV appears to be well-formed.
@@ -1591,7 +1595,11 @@ public:
* This method initializes the TLV.
*
*/
void Init(void) { SetType(Mle::Tlv::kPendingTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); }
void Init(void) {
SetType(Mle::Tlv::kPendingTimestamp);
SetLength(sizeof(*this) - sizeof(Tlv));
Timestamp::Init();
}
/**
* This method indicates whether or not the TLV appears to be well-formed.