mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-05 14:35:31 +00:00
Added TG rewrite code
This commit is contained in:
parent
bce0056101
commit
c53a96baab
3 changed files with 59 additions and 1 deletions
16
DMRSlot.cpp
16
DMRSlot.cpp
|
|
@ -157,7 +157,7 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len)
|
|||
if (!DMRAccessControl::validateAccess(id, did, m_slotNo, false)) {
|
||||
delete lc;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_rfLC = lc;
|
||||
|
||||
|
|
@ -762,6 +762,13 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
unsigned int id = m_netLC->getSrcId();
|
||||
if (!DMRAccessControl::validateAccess(id, did, m_slotNo, true))
|
||||
return;
|
||||
|
||||
// Test dst rewrite
|
||||
unsigned int rw_id = DMRAccessControl::DstIdRewrite(id, true);
|
||||
if (rw_id) {
|
||||
LogMessage("Rewrite ID: %u", rw_id);
|
||||
m_netLC->setDstId(rw_id);
|
||||
}
|
||||
|
||||
// Store the LC for the embedded LC
|
||||
m_netEmbeddedLC.setData(*m_netLC);
|
||||
|
|
@ -825,6 +832,13 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
unsigned int id = m_netLC->getSrcId();
|
||||
if (!DMRAccessControl::validateAccess(id, did, m_slotNo, true))
|
||||
return;
|
||||
|
||||
// Test dst rewrite
|
||||
unsigned int rw_id = DMRAccessControl::DstIdRewrite(id,true);
|
||||
if (rw_id) {
|
||||
LogMessage("Rewrite ID: %u", rw_id);
|
||||
m_netLC->setDstId(rw_id);
|
||||
}
|
||||
|
||||
// Regenerate the Slot Type
|
||||
CDMRSlotType slotType;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue