perform network watchdog handling in a more centralized manner in Voice::processNetwork(); fix condition where remote grant demands may happen even though TG hangtimers are running;

pull/121/merge
Bryan Biedenkapp 1 month ago
parent 9449de77d4
commit d8a65dc766

@ -1010,11 +1010,6 @@ void Control::clock()
}
}
if (m_netState != RS_NET_IDLE) {
m_voice->resetNet();
m_netState = RS_NET_IDLE;
}
m_netLastDstId = 0U;
m_netLastSrcId = 0U;
}
@ -1648,6 +1643,17 @@ void Control::processNetwork()
return;
}
// if we're non-dedicated control, and if either of the talkgroup hang timers are running, ignore the grant demand
if (!m_dedicatedControl) {
if (m_rfTGHang.isRunning() && !m_rfTGHang.hasExpired()) {
return;
}
if (m_netTGHang.isRunning() && !m_netTGHang.hasExpired()) {
return;
}
}
// validate source RID
if (!acl::AccessControl::validateSrcId(srcId)) {
return;

@ -1151,6 +1151,9 @@ bool Voice::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, data::L
if (checkNetTrafficCollision(srcId, dstId, duid))
return false;
if (m_p25->m_netState == RS_NET_AUDIO && (duid != DUID::TDU && duid != DUID::TDULC))
m_p25->m_networkWatchdog.start();
uint32_t count = 0U;
switch (duid) {
case DUID::LDU1:
@ -1891,7 +1894,6 @@ void Voice::writeNet_LDU1()
}
}
m_p25->m_networkWatchdog.start();
m_hadVoice = true;
m_p25->m_netState = RS_NET_AUDIO;
m_p25->m_netLastDstId = dstId;
@ -2105,8 +2107,6 @@ void Voice::writeNet_LDU2()
return;
}
m_p25->m_networkWatchdog.start();
uint8_t mi[MI_LENGTH_BYTES];
control.getMI(mi);

Loading…
Cancel
Save

Powered by TurnKey Linux.