When startup id == 20 (P252DMR), then do not change P25 reflectors

This commit is contained in:
Doug McLain 2020-06-19 14:02:00 -04:00
parent d1a8772eb5
commit 79e3270560
2 changed files with 8 additions and 3 deletions

View File

@ -232,6 +232,8 @@ void CP25Gateway::run()
unsigned int currentPort = 0U;
unsigned int startupId = m_conf.getNetworkStartup();
bool p252dmr_enabled = (startupId == 20) ? true : false;
if (startupId != 9999U) {
CP25Reflector* reflector = reflectors.find(startupId);
if (reflector != NULL) {
@ -291,8 +293,11 @@ void CP25Gateway::run()
srcId = (buffer[1U] << 16) & 0xFF0000U;
srcId |= (buffer[2U] << 8) & 0x00FF00U;
srcId |= (buffer[3U] << 0) & 0x0000FFU;
if (dstId != currentId) {
if(p252dmr_enabled){
currentId = dstId;
}
else if (dstId != currentId) {
CP25Reflector* reflector = NULL;
if (dstId != 9999U)
reflector = reflectors.find(dstId);

View File

@ -148,7 +148,7 @@ bool CReflectors::load()
refl->m_address = CUDPSocket::lookup(m_p252dmrAddress);
refl->m_port = m_p252dmrPort;
m_reflectors.push_back(refl);
LogInfo("Loaded P25 parrot (TG%u)", refl->m_id);
LogInfo("Loaded P252DMR (TG%u)", refl->m_id);
}
size = m_reflectors.size();