Restore code beauty ;-)

This commit is contained in:
phl0 2018-12-10 20:59:40 +01:00
parent 14b86da9ea
commit 32699fb860
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A
3 changed files with 19 additions and 22 deletions

View file

@ -267,7 +267,7 @@ int CDAPNETGateway::run()
}
std::vector<unsigned int> whiteList = m_conf.getWhiteList();
std::vector<unsigned int> blackList = m_conf.getBlackList();
std::vector<unsigned int> blackList = m_conf.getBlackList();
std::vector<std::regex> regexBlacklist;
std::vector<std::regex> regexWhitelist;
@ -281,7 +281,6 @@ int CDAPNETGateway::run()
regexWhitelist = m_regexWhitelist->get();
for (;;) {
unsigned char buffer[200U];
@ -322,15 +321,12 @@ int CDAPNETGateway::run()
if (!whiteList.empty())
found = std::find(whiteList.begin(), whiteList.end(), message->m_ric) != whiteList.end();
// If we have a black list of RICs, use it.
if (!blackList.empty())
blackListRIC = std::find(blackList.begin(), blackList.end(), message->m_ric) != blackList.end();
// If we have a black list of RICs, use it.
if (!blackList.empty())
blackListRIC = std::find(blackList.begin(), blackList.end(), message->m_ric) != blackList.end();
if (blackListRIC)
LogDebug("Blacklist match: Not queueing message to %07u, type %u, message: \"%.*s\"", message->m_ric, message->m_type, message->m_length, message->m_message);
std::string messageBody(reinterpret_cast<char*>(message->m_message));
//If we have a list of blacklist REGEXes, use them
if (!regexBlacklist.empty()) {
@ -355,7 +351,7 @@ int CDAPNETGateway::run()
}
}
if (found && !blackListRIC && !blacklistRegexmatch && whitelistRegexmatch) {
if (found && !blackListRIC && !blacklistRegexmatch && whitelistRegexmatch) {
switch (message->m_functional) {
case FUNCTIONAL_ALPHANUMERIC:
LogDebug("Queueing message to %07u, type %u, func Alphanumeric: \"%.*s\"", message->m_ric, message->m_type, message->m_length, message->m_message);