Fix bug in whitelist logic that was blocking secondary TGs

This commit is contained in:
Simon 2016-07-08 14:04:15 +01:00
parent 7585537dcb
commit f48b982e93

View file

@ -1530,9 +1530,12 @@ bool CDMRSlot::DstIdWhitelist(unsigned int did, unsigned int slot, bool gt4k)
//On slot2 we allow reflector control IDs, but not secondary TG IDs unless specifically listed. Also allow echo. //On slot2 we allow reflector control IDs, but not secondary TG IDs unless specifically listed. Also allow echo.
if (gt4k) { if (gt4k) {
if (std::find(m_dstWhiteListSlot2.begin(), m_dstWhiteListSlot2.end(), did) != m_dstWhiteListSlot2.end() || did >= 4000 || did == 0) { if (std::find(m_dstWhiteListSlot2.begin(), m_dstWhiteListSlot2.end(), did) != m_dstWhiteListSlot2.end() || did == 0)
//if dstId in secondary TG range return true;
if (did > 5000U && did < 10000U || did == 0)
//if dstId in secondary TG range or whitelist
else if (did >= 4000) {
if (did > 5000U && did < 10000U)
return false; return false;
else else
return true; return true;