mirror of
https://github.com/espressif/openthread.git
synced 2026-09-03 07:40:10 +00:00
Fix networkname TLV and mesh local prefix TLV (#563)
This commit is contained in:
@@ -110,10 +110,10 @@ ThreadError Dataset::Print(otOperationalDataset &aDataset)
|
||||
{
|
||||
const uint8_t *prefix = aDataset.mMeshLocalPrefix.m8;
|
||||
sServer->OutputFormat("Mesh Local Prefix: %x:%x:%x:%x/64\r\n",
|
||||
(static_cast<uint16_t>(prefix[0]) << 16) | prefix[1],
|
||||
(static_cast<uint16_t>(prefix[2]) << 16) | prefix[3],
|
||||
(static_cast<uint16_t>(prefix[4]) << 16) | prefix[5],
|
||||
(static_cast<uint16_t>(prefix[6]) << 16) | prefix[7]);
|
||||
(static_cast<uint16_t>(prefix[0]) << 8) | prefix[1],
|
||||
(static_cast<uint16_t>(prefix[2]) << 8) | prefix[3],
|
||||
(static_cast<uint16_t>(prefix[4]) << 8) | prefix[5],
|
||||
(static_cast<uint16_t>(prefix[6]) << 8) | prefix[7]);
|
||||
}
|
||||
|
||||
if (aDataset.mIsMasterKeySet)
|
||||
|
||||
@@ -156,8 +156,8 @@ void Dataset::Get(otOperationalDataset &aDataset)
|
||||
case Tlv::kNetworkName:
|
||||
{
|
||||
const NetworkNameTlv *tlv = static_cast<const NetworkNameTlv *>(cur);
|
||||
memcpy(aDataset.mMasterKey.m8, tlv->GetNetworkName(), tlv->GetLength());
|
||||
aDataset.mIsMasterKeySet = true;
|
||||
memcpy(aDataset.mNetworkName.m8, tlv->GetNetworkName(), tlv->GetLength());
|
||||
aDataset.mIsNetworkNameSet = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user