Do not signal network data update if nothing has changed. (#416)

This commit is contained in:
Jonathan Hui
2016-08-18 13:32:53 -07:00
committed by GitHub
parent adba70a390
commit afaba6a7ff
+10 -8
View File
@@ -445,19 +445,21 @@ void Leader::RemoveBorderRouter(uint16_t aRloc16)
bool rlocStable = false;
RlocLookup(aRloc16, rlocIn, rlocStable, mTlvs, mLength);
if (rlocIn)
{
RemoveRloc(aRloc16);
mVersion++;
VerifyOrExit(rlocIn, ;);
if (rlocStable)
{
mStableVersion++;
}
RemoveRloc(aRloc16);
mVersion++;
if (rlocStable)
{
mStableVersion++;
}
mMle.HandleNetworkDataUpdate();
mNetif.SetStateChangedFlags(OT_THREAD_NETDATA_UPDATED);
exit:
return;
}
void Leader::HandleServerData(void *aContext, Coap::Header &aHeader, Message &aMessage,