From d886876cf89f9492b5c7ca7792075da7d88efaa0 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Fri, 4 Mar 2022 14:24:37 -0800 Subject: [PATCH] Fixing mutex --- src/RESTAPI/RESTAPI_inventory_handler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/RESTAPI/RESTAPI_inventory_handler.cpp b/src/RESTAPI/RESTAPI_inventory_handler.cpp index e08eeb7..4eca089 100644 --- a/src/RESTAPI/RESTAPI_inventory_handler.cpp +++ b/src/RESTAPI/RESTAPI_inventory_handler.cpp @@ -69,22 +69,28 @@ namespace OpenWifi{ } return ReturnObject(Answer); } else if(HasParameter("applyConfiguration",Arg) && Arg=="true") { + Logger().debug(Poco::format("%: Retrieving configuration.",Existing.serialNumber)); APConfig Device(SerialNumber, Existing.deviceType, Logger(), false); Poco::JSON::Object::Ptr Configuration; Poco::JSON::Object ErrorsObj, WarningsObj; ProvObjects::InventoryConfigApplyResult Results; + Logger().debug(Poco::format("%: Computing configuration.",Existing.serialNumber)); if (Device.Get(Configuration)) { std::ostringstream OS; Configuration->stringify(OS); Results.appliedConfiguration = OS.str(); Poco::JSON::Object::Ptr Response; + Logger().debug(Poco::format("%: Sending configuration push.",Existing.serialNumber)); if (SDK::GW::Device::Configure(this, SerialNumber, Configuration, Response)) { + Logger().debug(Poco::format("%: Sending configuration pushed.",Existing.serialNumber)); GetRejectedLines(Response, Results.warnings); Results.errorCode = 0; } else { + Logger().debug(Poco::format("%: Sending configuration failed.",Existing.serialNumber)); Results.errorCode = 1; } } else { + Logger().debug(Poco::format("%: Configuration is bad.",Existing.serialNumber)); Results.errorCode = 1; } Results.to_json(Answer);