From 705a183f06dfaab8b553d18a2e6dc20094428175 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Mon, 7 Mar 2022 10:04:24 -0800 Subject: [PATCH] Adding removal subscriber --- src/RESTAPI/RESTAPI_inventory_handler.cpp | 1 + src/storage/storage_inventory.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/RESTAPI/RESTAPI_inventory_handler.cpp b/src/RESTAPI/RESTAPI_inventory_handler.cpp index 326bc19..314f2bc 100644 --- a/src/RESTAPI/RESTAPI_inventory_handler.cpp +++ b/src/RESTAPI/RESTAPI_inventory_handler.cpp @@ -34,6 +34,7 @@ namespace OpenWifi{ } void RESTAPI_inventory_handler::DoGet() { + ProvObjects::InventoryTag Existing; std::string SerialNumber = GetBinding(RESTAPI::Protocol::SERIALNUMBER,""); if(SerialNumber.empty() || !DB_.GetRecord(RESTAPI::Protocol::SERIALNUMBER,SerialNumber,Existing)) { diff --git a/src/storage/storage_inventory.cpp b/src/storage/storage_inventory.cpp index 5ddb242..9be698a 100644 --- a/src/storage/storage_inventory.cpp +++ b/src/storage/storage_inventory.cpp @@ -364,7 +364,6 @@ namespace OpenWifi { } return true; } - } template<> void ORM::DB< OpenWifi::InventoryDBRecordType, OpenWifi::ProvObjects::InventoryTag>::Convert(const OpenWifi::InventoryDBRecordType &In, OpenWifi::ProvObjects::InventoryTag &Out) { @@ -389,7 +388,8 @@ template<> void ORM::DB< OpenWifi::InventoryDBRecordType, OpenWifi::ProvObjec Out.managementPolicy = In.get<18>(); Out.state = In.get<19>(); Out.devClass = In.get<20>(); - Out.realMacAddress = In.get<21>(); + Out.locale = In.get<21>(); + Out.realMacAddress = In.get<22>(); } template<> void ORM::DB< OpenWifi::InventoryDBRecordType, OpenWifi::ProvObjects::InventoryTag>::Convert(const OpenWifi::ProvObjects::InventoryTag &In, OpenWifi::InventoryDBRecordType &Out) { @@ -414,5 +414,6 @@ template<> void ORM::DB< OpenWifi::InventoryDBRecordType, OpenWifi::ProvObjec Out.set<18>(In.managementPolicy); Out.set<19>(In.state); Out.set<20>(In.devClass); - Out.set<21>(In.realMacAddress); + Out.set<21>(In.locale); + Out.set<22>(In.realMacAddress); }