mirror of
https://github.com/g4klx/DAPNETGateway.git
synced 2026-08-26 12:32:45 -04:00
more REGEX logic
This commit is contained in:
parent
d233580d9b
commit
ba2a92e8e2
1 changed files with 2 additions and 2 deletions
|
|
@ -304,7 +304,7 @@ int CDAPNETGateway::run()
|
|||
if (!whiteList.empty())
|
||||
found = std::find(whiteList.begin(), whiteList.end(), message->m_ric) != whiteList.end();
|
||||
if (m_regex.empty())
|
||||
m_regex.push_back(std::regex("^E.*"));
|
||||
m_regex.push_back(std::regex("^E.*$"));
|
||||
//If we have a list of blacklist REGEXes, use them
|
||||
if (!m_regex.empty()) {
|
||||
std::string messageBody(reinterpret_cast<char*>(message->m_message));
|
||||
|
|
@ -312,7 +312,7 @@ int CDAPNETGateway::run()
|
|||
bool ret = std::regex_match(messageBody,regex);
|
||||
//If the regex matches the message body, don't send the message
|
||||
if (ret)
|
||||
regexmatch = false;
|
||||
regexmatch = true;
|
||||
LogDebug("Blacklist REGEX match: Not queueing message to %07u, type %u, message: \"%.*s\"", message->m_ric, message->m_type, message->m_length, message->m_message);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue