[netdata] ensure to update version on leader if there is any change (#8472)

This commit updates `RegisterNetdataData()` to ensure that versions
are updated if there is any change even if there is an error during
integration of new entries (e.g., running out of space in Network
Data, or failing to allocate new service ID).
This commit is contained in:
Abtin Keshavarzian
2022-12-05 14:11:33 -08:00
committed by GitHub
parent 2167fda5a8
commit cf4e514d00
+1 -2
View File
@@ -712,11 +712,10 @@ void Leader::RegisterNetworkData(uint16_t aRloc16, const NetworkData &aNetworkDa
}
}
IncrementVersions(flags);
DumpDebg("Register", GetBytes(), GetLength());
exit:
IncrementVersions(flags);
if (error != kErrorNone)
{