mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 13:47:47 +00:00
[pending-dataset] MGMT_PENDING_GET.rsp must include Delay Timer TLV (#2166)
This commit is contained in:
@@ -373,6 +373,25 @@ void DatasetManager::Get(const Coap::Header &aHeader, const Message &aMessage,
|
||||
offset += sizeof(tlv) + tlv.GetLength();
|
||||
}
|
||||
|
||||
// MGMT_PENDING_GET.rsp must include Delay Timer TLV (Thread 1.1.1 Section 8.7.5.4)
|
||||
if (length != 0 && strcmp(mUriGet, OT_URI_PATH_PENDING_GET) == 0)
|
||||
{
|
||||
uint16_t i;
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
if (tlvs[i] == Tlv::kDelayTimer)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == length && (i + 1u) <= sizeof(tlvs))
|
||||
{
|
||||
tlvs[length++] = Tlv::kDelayTimer;
|
||||
}
|
||||
}
|
||||
|
||||
SendGetResponse(aHeader, aMessageInfo, tlvs, length);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user