mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 17:52:28 +00:00
Fixing mutex
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user