mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 00:35:53 +08:00
Disabled broken memcpy() causing segfault
This commit is contained in:
@@ -203,18 +203,18 @@ bool DMRAccessControl::validateAccess (unsigned int src_id, unsigned int dst_id,
|
|||||||
unsigned int DMRAccessControl::DstIdRewrite (unsigned int did, unsigned int sid, unsigned int slot, bool network, CDMRLC* dmrLC)
|
unsigned int DMRAccessControl::DstIdRewrite (unsigned int did, unsigned int sid, unsigned int slot, bool network, CDMRLC* dmrLC)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (slot == 1 && m_TGRewriteSlot1 == false)
|
// if (slot == 1 && m_TGRewriteSlot1 == false)
|
||||||
return 0;
|
// return 0;
|
||||||
|
|
||||||
if (slot == 2 && m_TGRewriteSlot2 == false)
|
// if (slot == 2 && m_TGRewriteSlot2 == false)
|
||||||
return 0;
|
// return 0;
|
||||||
|
|
||||||
std::time_t currenttime = std::time(nullptr);
|
std::time_t currenttime = std::time(nullptr);
|
||||||
|
|
||||||
if (network) {
|
if (network) {
|
||||||
m_dstRewriteID = did;
|
m_dstRewriteID = did;
|
||||||
m_SrcID = sid;
|
m_SrcID = sid;
|
||||||
memcpy(&dmrLC, &m_lastdmrLC, sizeof(dmrLC));
|
//memcpy(&dmrLC, &m_lastdmrLC, sizeof(dmrLC));
|
||||||
if ( (did < 4000 || did > 5000) && did > 0 && did != 9 && dmrLC->getFLCO() == FLCO_GROUP ) {
|
if ( (did < 4000 || did > 5000) && did > 0 && did != 9 && dmrLC->getFLCO() == FLCO_GROUP ) {
|
||||||
LogMessage("DMR Slot %u, Rewrite DST ID (TG) of of inbound network traffic from %u to 9",slot,did);
|
LogMessage("DMR Slot %u, Rewrite DST ID (TG) of of inbound network traffic from %u to 9",slot,did);
|
||||||
return 9;
|
return 9;
|
||||||
|
|||||||
Reference in New Issue
Block a user