mirror of
https://github.com/g4klx/DAPNETGateway.git
synced 2026-08-26 12:32:45 -04:00
Add config options for REGEX support. Also add README.REGEX
This commit is contained in:
parent
4c47986da0
commit
08157c342c
6 changed files with 53 additions and 10 deletions
18
Conf.cpp
18
Conf.cpp
|
|
@ -37,6 +37,8 @@ CConf::CConf(const std::string& file) :
|
|||
m_file(file),
|
||||
m_callsign(),
|
||||
m_whiteList(),
|
||||
m_blacklistRegexfile(),
|
||||
m_whitelistRegexfile(),
|
||||
m_rptAddress(),
|
||||
m_rptPort(0U),
|
||||
m_myAddress(),
|
||||
|
|
@ -105,7 +107,11 @@ bool CConf::read()
|
|||
m_whiteList.push_back(ric);
|
||||
p = ::strtok(NULL, ",\r\n");
|
||||
}
|
||||
} else if (::strcmp(key, "RptAddress") == 0)
|
||||
} else if (::strcmp(key,"BlacklistRegexfile") == 0)
|
||||
m_blacklistRegexfile = value;
|
||||
else if (::strcmp(key,"WhitelistRegexfile") == 0)
|
||||
m_whitelistRegexfile = value;
|
||||
else if (::strcmp(key, "RptAddress") == 0)
|
||||
m_rptAddress = value;
|
||||
else if (::strcmp(key, "RptPort") == 0)
|
||||
m_rptPort = (unsigned int)::atoi(value);
|
||||
|
|
@ -155,6 +161,16 @@ std::vector<uint32_t> CConf::getWhiteList() const
|
|||
return m_whiteList;
|
||||
}
|
||||
|
||||
std::string CConf::getblacklistRegexfile() const
|
||||
{
|
||||
return m_blacklistRegexfile;
|
||||
}
|
||||
|
||||
std::string CConf::getwhitelistRegexfile() const
|
||||
{
|
||||
return m_whitelistRegexfile;
|
||||
}
|
||||
|
||||
std::string CConf::getRptAddress() const
|
||||
{
|
||||
return m_rptAddress;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue