From cf4e514d002952a55cc2e581da3b6a8431f99a74 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 5 Dec 2022 14:11:33 -0800 Subject: [PATCH] [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). --- src/core/thread/network_data_leader_ftd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/thread/network_data_leader_ftd.cpp b/src/core/thread/network_data_leader_ftd.cpp index 8e00a4cad..aa5fb0c52 100644 --- a/src/core/thread/network_data_leader_ftd.cpp +++ b/src/core/thread/network_data_leader_ftd.cpp @@ -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) {