From 35aa6fb99d4c3428f63ae8f405a0e8950d922772 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Thu, 4 Jan 2024 13:39:23 -0800 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-13268 Signed-off-by: stephb9959 --- src/AP_WS_LookForUpgrade.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/AP_WS_LookForUpgrade.cpp b/src/AP_WS_LookForUpgrade.cpp index 85db7568..0f5d22fb 100644 --- a/src/AP_WS_LookForUpgrade.cpp +++ b/src/AP_WS_LookForUpgrade.cpp @@ -40,6 +40,17 @@ namespace OpenWifi { } Config::Config Cfg(D.Configuration); + if(D.UUID==0 && UUID == Cfg.UUID()) { + D.UUID = UpgradedUUID = UUID; + Cfg.SetUUID(UUID); + D.Configuration = Cfg.get(); + StorageService()->UpdateDevice(Session, D); + ConfigurationCache().Add(SerialNumberInt_, UUID); + std::cout << __LINE__ << ": " << SerialNumber_ << " GoodConfig: " << GoodConfig << " UUID:" << UUID << " Pending:" << State_.PendingUUID << std::endl; + return false; + } + + if (UUID > D.UUID) { // so we have a problem, the device has a newer config than we have. So we need to // make sure our config is newer.