From 6595b37ae4f2e6191c3d49e25f690f4e3a27448d Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Thu, 14 Mar 2024 22:38:52 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-13507 Signed-off-by: stephb9959 --- src/storage/storage_device.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/storage/storage_device.cpp b/src/storage/storage_device.cpp index 252f511e..fed60f9f 100644 --- a/src/storage/storage_device.cpp +++ b/src/storage/storage_device.cpp @@ -582,10 +582,18 @@ namespace OpenWifi { Config::Config NewConfig(DefConfig.Configuration); NewConfig.SetUUID(Now); D.Configuration = NewConfig.get(); - } else if (!Found && Caps.Platform()==Platforms::AP) { - Config::Config NewConfig; - NewConfig.SetUUID(Now); - D.Configuration = NewConfig.get(); + } else if (!Found) { + if(Caps.Platform()==Platforms::AP) { + Config::Config NewConfig; + NewConfig.SetUUID(Now); + D.Configuration = NewConfig.get(); + } else { + Poco::JSON::Object Obj; + Obj.set("uuid", Now); + std::ostringstream os; + Obj.stringify(os); + D.Configuration = os.str(); + } } // We need to insert the country code according to the IP in the radios section...