From 1948c50ad45c7059f0bfb9e42222ac2e1886e228 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Fri, 22 Sep 2023 22:04:27 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-12945 Signed-off-by: stephb9959 --- src/AutoDiscovery.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/AutoDiscovery.cpp b/src/AutoDiscovery.cpp index ac5b9bb..6072825 100644 --- a/src/AutoDiscovery.cpp +++ b/src/AutoDiscovery.cpp @@ -71,14 +71,11 @@ namespace OpenWifi { auto Msg = dynamic_cast(Note.get()); if (Msg != nullptr) { try { - DBGLINE Poco::JSON::Parser Parser; auto Object = Parser.parse(Msg->Payload()).extract(); - DBGLINE std::cout << Msg->Payload() << std::endl; if (Object->has(uCentralProtocol::PAYLOAD)) { - DBGLINE auto PayloadObj = Object->getObject(uCentralProtocol::PAYLOAD); std::string ConnectedIP, SerialNumber, Compatible, Firmware, Locale ; if (PayloadObj->has(uCentralProtocol::PING)) { @@ -86,28 +83,23 @@ namespace OpenWifi { ProcessPing(PingObj, Firmware, SerialNumber, Compatible, ConnectedIP, Locale); } else if(PayloadObj->has("capabilities")) { ProcessConnect(PayloadObj, Firmware, SerialNumber, Compatible, ConnectedIP, Locale); + } else { + std::cout << Msg->Payload() << std::endl; } if (!SerialNumber.empty()) { - DBGLINE StorageService()->InventoryDB().CreateFromConnection( SerialNumber, ConnectedIP, Compatible, Locale); } } } catch (const Poco::Exception &E) { - DBGLINE std::cout << "EX:" << Msg->Payload() << std::endl; Logger().log(E); - DBGLINE } catch (...) { - DBGLINE } } else { - DBGLINE } - DBGLINE Note = Queue_.waitDequeueNotification(); - DBGLINE } }