From f719bffbba4875d74142dde64e62cbdda2becddb Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Sun, 18 Jun 2023 15:33:55 -0400 Subject: [PATCH] cleanup incorrect variable usage (inclusion vs exclusion); --- src/network/FNENetwork.cpp | 8 ++++++-- src/network/fne/TagDMRData.cpp | 2 +- src/network/fne/TagNXDNData.cpp | 2 +- src/network/fne/TagP25Data.cpp | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/network/FNENetwork.cpp b/src/network/FNENetwork.cpp index 5d3f4074..632a03b8 100644 --- a/src/network/FNENetwork.cpp +++ b/src/network/FNENetwork.cpp @@ -778,13 +778,15 @@ void FNENetwork::writeTGIDs(uint32_t peerId, bool queueOnly) if (inclusion.size() > 0) { auto it = std::find(inclusion.begin(), inclusion.end(), peerId); if (it == inclusion.end()) { + // LogDebug(LOG_NET, "PEER %u TGID %u TS %u -- not included peer", peerId, entry.source().tgId(), entry.source().tgSlot()); continue; } } else { if (exclusion.size() > 0) { auto it = std::find(exclusion.begin(), exclusion.end(), peerId); - if (it != inclusion.end()) { + if (it != exclusion.end()) { + // LogDebug(LOG_NET, "PEER %u TGID %u TS %u -- excluded peer", peerId, entry.source().tgId(), entry.source().tgSlot()); continue; } } @@ -846,13 +848,15 @@ void FNENetwork::writeDeactiveTGIDs(uint32_t peerId, bool queueOnly) if (inclusion.size() > 0) { auto it = std::find(inclusion.begin(), inclusion.end(), peerId); if (it == inclusion.end()) { + // LogDebug(LOG_NET, "PEER %u TGID %u TS %u -- not included peer", peerId, entry.source().tgId(), entry.source().tgSlot()); continue; } } else { if (exclusion.size() > 0) { auto it = std::find(exclusion.begin(), exclusion.end(), peerId); - if (it != inclusion.end()) { + if (it != exclusion.end()) { + // LogDebug(LOG_NET, "PEER %u TGID %u TS %u -- excluded peer", peerId, entry.source().tgId(), entry.source().tgSlot()); continue; } } diff --git a/src/network/fne/TagDMRData.cpp b/src/network/fne/TagDMRData.cpp index 67d534b1..f7e998b2 100644 --- a/src/network/fne/TagDMRData.cpp +++ b/src/network/fne/TagDMRData.cpp @@ -281,7 +281,7 @@ bool TagDMRData::isPeerPermitted(uint32_t peerId, dmr::data::Data& data, uint32_ else { if (exclusion.size() > 0) { auto it = std::find(exclusion.begin(), exclusion.end(), peerId); - if (it != inclusion.end()) { + if (it != exclusion.end()) { return false; } } diff --git a/src/network/fne/TagNXDNData.cpp b/src/network/fne/TagNXDNData.cpp index 4722a6d7..2daca3f9 100644 --- a/src/network/fne/TagNXDNData.cpp +++ b/src/network/fne/TagNXDNData.cpp @@ -254,7 +254,7 @@ bool TagNXDNData::isPeerPermitted(uint32_t peerId, nxdn::lc::RTCH& lc, uint8_t m else { if (exclusion.size() > 0) { auto it = std::find(exclusion.begin(), exclusion.end(), peerId); - if (it != inclusion.end()) { + if (it != exclusion.end()) { return false; } } diff --git a/src/network/fne/TagP25Data.cpp b/src/network/fne/TagP25Data.cpp index b1976aa8..286c1d9f 100644 --- a/src/network/fne/TagP25Data.cpp +++ b/src/network/fne/TagP25Data.cpp @@ -300,7 +300,7 @@ bool TagP25Data::isPeerPermitted(uint32_t peerId, p25::lc::LC& control, uint8_t else { if (exclusion.size() > 0) { auto it = std::find(exclusion.begin(), exclusion.end(), peerId); - if (it != inclusion.end()) { + if (it != exclusion.end()) { return false; } }