[mle] log rloc16 changes (#4486)

This commit is contained in:
Abtin Keshavarzian
2020-01-22 20:52:09 -08:00
committed by Jonathan Hui
parent f816635465
commit 583873c133
+7
View File
@@ -962,6 +962,13 @@ uint16_t Mle::GetRloc16(void) const
void Mle::SetRloc16(uint16_t aRloc16)
{
uint16_t oldRloc16 = GetRloc16();
if (aRloc16 != oldRloc16)
{
otLogNoteMle("RLOC16 %04x -> %04x", oldRloc16, aRloc16);
}
Get<ThreadNetif>().RemoveUnicastAddress(mMeshLocal16);
Get<Mac::Mac>().SetShortAddress(aRloc16);