Further refinement of TGRewrite logic

This commit is contained in:
Simon 2016-09-16 13:51:24 +01:00
parent ce74a799c1
commit ff04fea52f

View file

@ -216,17 +216,16 @@ unsigned int DMRAccessControl::DstIdRewrite (unsigned int did, unsigned int sid,
} else { } else {
return 0; return 0;
} }
} else { } else if (did == 9 && m_dstRewriteID != 9 && m_dstRewriteID != 0 && (m_time + m_callHang) > currenttime) {
if (did == 9 && m_dstRewriteID != 9 && (m_time + m_callHang) > currenttime) {
LogMessage("DMR Slot %u, Rewrite DST ID (TG) of outbound network traffic from %u to %u (return traffic during CallHang)",slot,did,m_dstRewriteID); LogMessage("DMR Slot %u, Rewrite DST ID (TG) of outbound network traffic from %u to %u (return traffic during CallHang)",slot,did,m_dstRewriteID);
return(m_dstRewriteID); return(m_dstRewriteID);
} else { } else if (did < 4000 && did > 0 && did !=9) {
return(0); m_dstRewriteID = did;
} }
} return 0;
} }
void DMRAccessControl::setOverEndTime() void DMRAccessControl::setOverEndTime()
{ {
m_time = std::time(nullptr); m_time = std::time(nullptr);