From 625ace2d5022a89b856a37597b89a17ca7930d5c Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Fri, 15 Sep 2023 10:26:08 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-7831 Signed-off-by: stephb9959 --- src/RADIUS_proxy_server.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/RADIUS_proxy_server.cpp b/src/RADIUS_proxy_server.cpp index c9474cf0..fd2c4fa0 100644 --- a/src/RADIUS_proxy_server.cpp +++ b/src/RADIUS_proxy_server.cpp @@ -208,7 +208,7 @@ namespace OpenWifi { } P.Evaluate(ReceiveSize); - if(P.PacketTypeInt()==OpenWifi::RADIUS::Access_Accept) { + if(Logger().trace()) { P.Log(std::cout); } auto SerialNumber = P.ExtractSerialNumberFromProxyState(); @@ -419,10 +419,12 @@ namespace OpenWifi { Destination = "0.0.0.0:0"; } - P.Log(std::cout); + if(Logger().trace()) { + P.Log(std::cout); + } if(Destination.empty()) { - std::cout << "No destination in CoA. Dropped." << std::endl; + poco_warning(Logger(),fmt::format("{}: CoA packet does not have a valid destination.", serialNumber)); return; } @@ -692,10 +694,6 @@ namespace OpenWifi { return Pool[0].Addr; } - if(Pool.empty()) { - std::cout << __LINE__ << std::endl; - } - if (Pool[0].strategy == "weighted") { bool found = false; uint64_t cur_state = std::numeric_limits::max();