mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-03-06 13:23:52 +01:00
Added whitelist and blacklist config
This commit is contained in:
parent
9dfba5095c
commit
03c938a782
48
Conf.cpp
48
Conf.cpp
|
|
@ -308,6 +308,38 @@ bool CConf::read()
|
|||
m_dmrBlackList.push_back(id);
|
||||
p = ::strtok(NULL, ",\r\n");
|
||||
}
|
||||
} else if (::strcmp(key, "DstIdBlackListSlot1") == 0) {
|
||||
char* p = ::strtok(value, ",\r\n");
|
||||
while (p != NULL) {
|
||||
unsigned int id = (unsigned int)::atoi(p);
|
||||
if (id > 0U)
|
||||
m_dmrDstIdBlacklistSlot1.push_back(id);
|
||||
p = ::strtok(NULL, ",\r\n");
|
||||
}
|
||||
} else if (::strcmp(key, "DstIdBlackListSlot2") == 0) {
|
||||
char* p = ::strtok(value, ",\r\n");
|
||||
while (p != NULL) {
|
||||
unsigned int id = (unsigned int)::atoi(p);
|
||||
if (id > 0U)
|
||||
m_dmrDstIdBlacklistSlot2.push_back(id);
|
||||
p = ::strtok(NULL, ",\r\n");
|
||||
}
|
||||
} else if (::strcmp(key, "DstIdWhiteListSlot1") == 0) {
|
||||
char* p = ::strtok(value, ",\r\n");
|
||||
while (p != NULL) {
|
||||
unsigned int id = (unsigned int)::atoi(p);
|
||||
if (id > 0U)
|
||||
m_dmrDstIdWhitelistSlot1.push_back(id);
|
||||
p = ::strtok(NULL, ",\r\n");
|
||||
}
|
||||
} else if (::strcmp(key, "DstIdWhiteListSlot2") == 0) {
|
||||
char* p = ::strtok(value, ",\r\n");
|
||||
while (p != NULL) {
|
||||
unsigned int id = (unsigned int)::atoi(p);
|
||||
if (id > 0U)
|
||||
m_dmrDstIdWhitelistSlot2.push_back(id);
|
||||
p = ::strtok(NULL, ",\r\n");
|
||||
}
|
||||
} else if (::strcmp(key, "LookupFile") == 0)
|
||||
m_dmrLookupFile = value;
|
||||
else if (::strcmp(key, "TXHang") == 0)
|
||||
|
|
@ -608,7 +640,21 @@ std::vector<unsigned int> CConf::getDMRBlackList() const
|
|||
{
|
||||
return m_dmrBlackList;
|
||||
}
|
||||
|
||||
std::vector<unsigned int> CConf::getDMRDstIdBlacklistSlot1() const
|
||||
{
|
||||
return m_dmrDstIdBlacklistSlot1;
|
||||
}
|
||||
std::vector<unsigned int> CConf::getDMRDstIdBlacklistSlot2() const
|
||||
{
|
||||
return m_dmrDstIdBlacklistSlot2;
|
||||
}
|
||||
std::vector<unsigned int> CConf::getDMRDstIdWhitelistSlot1() const
|
||||
{
|
||||
return m_dmrDstIdWhitelistSlot1;
|
||||
}std::vector<unsigned int> CConf::getDMRDstIdWhitelistSlot2() const
|
||||
{
|
||||
return m_dmrDstIdWhitelistSlot2;
|
||||
}
|
||||
std::string CConf::getDMRLookupFile() const
|
||||
{
|
||||
return m_dmrLookupFile;
|
||||
|
|
|
|||
Loading…
Reference in a new issue