Adding removal subscriber

This commit is contained in:
stephb9959
2022-03-07 13:59:34 -08:00
parent 03fee2646a
commit 1c33a4640f
7 changed files with 29 additions and 28 deletions

View File

@@ -73,12 +73,12 @@ namespace OpenWifi{
return ReturnObject(Answer);
} else if(HasParameter("applyConfiguration",Arg) && Arg=="true") {
Logger().debug(Poco::format("%s: Retrieving configuration.",Existing.serialNumber));
APConfig Device(SerialNumber, Existing.deviceType, Logger(), false);
auto Device = std::make_shared<APConfig>(SerialNumber, Existing.deviceType, Logger(), false);
auto Configuration = Poco::makeShared<Poco::JSON::Object>();
Poco::JSON::Object ErrorsObj, WarningsObj;
ProvObjects::InventoryConfigApplyResult Results;
Logger().debug(Poco::format("%s: Computing configuration.",Existing.serialNumber));
if (Device.Get(Configuration)) {
if (Device->Get(Configuration)) {
std::ostringstream OS;
Configuration->stringify(OS);
Results.appliedConfiguration = OS.str();