|
|
|
@ -783,6 +783,15 @@ bool Voice::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, data::L
|
|
|
|
m_netLastLDU1 = control;
|
|
|
|
m_netLastLDU1 = control;
|
|
|
|
m_netLastFrameType = frameType;
|
|
|
|
m_netLastFrameType = frameType;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_p25->m_control) {
|
|
|
|
|
|
|
|
lc::LC control = lc::LC(*m_dfsiLC.control());
|
|
|
|
|
|
|
|
m_p25->m_affiliations.touchGrant(control.getDstId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_p25->m_dedicatedControl && !m_p25->m_voiceOnControl) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (m_p25->m_netState == RS_NET_IDLE) {
|
|
|
|
if (m_p25->m_netState == RS_NET_IDLE) {
|
|
|
|
// are we interrupting a running CC?
|
|
|
|
// are we interrupting a running CC?
|
|
|
|
if (m_p25->m_ccRunning) {
|
|
|
|
if (m_p25->m_ccRunning) {
|
|
|
|
@ -838,6 +847,15 @@ bool Voice::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, data::L
|
|
|
|
m_dfsiLC.decodeLDU2(data + count, m_netLDU2 + 204U);
|
|
|
|
m_dfsiLC.decodeLDU2(data + count, m_netLDU2 + 204U);
|
|
|
|
count += 16U;
|
|
|
|
count += 16U;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_p25->m_control) {
|
|
|
|
|
|
|
|
lc::LC control = lc::LC(*m_dfsiLC.control());
|
|
|
|
|
|
|
|
m_p25->m_affiliations.touchGrant(control.getDstId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_p25->m_dedicatedControl && !m_p25->m_voiceOnControl) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (m_p25->m_netState == RS_NET_IDLE) {
|
|
|
|
if (m_p25->m_netState == RS_NET_IDLE) {
|
|
|
|
if (!m_p25->m_voiceOnControl) {
|
|
|
|
if (!m_p25->m_voiceOnControl) {
|
|
|
|
m_p25->m_modem->clearP25Data();
|
|
|
|
m_p25->m_modem->clearP25Data();
|
|
|
|
@ -1113,8 +1131,7 @@ void Voice::writeNet_LDU1()
|
|
|
|
|
|
|
|
|
|
|
|
// don't process network frames if this modem isn't authoritative
|
|
|
|
// don't process network frames if this modem isn't authoritative
|
|
|
|
if (!m_p25->m_authoritative && m_p25->m_permittedDstId != dstId) {
|
|
|
|
if (!m_p25->m_authoritative && m_p25->m_permittedDstId != dstId) {
|
|
|
|
// bryanb: do we want to log this condition?
|
|
|
|
LogWarning(LOG_NET, "[NON-AUTHORITATIVE] Ignoring network traffic (LDU1), destination not permitted!");
|
|
|
|
//LogWarning(LOG_NET, "[NON-AUTHORITATIVE] Ignoring network traffic, destination not permitted!");
|
|
|
|
|
|
|
|
resetNet();
|
|
|
|
resetNet();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1395,6 +1412,15 @@ void Voice::writeNet_LDU2()
|
|
|
|
lc::LC control = lc::LC(*m_dfsiLC.control());
|
|
|
|
lc::LC control = lc::LC(*m_dfsiLC.control());
|
|
|
|
data::LowSpeedData lsd = data::LowSpeedData(*m_dfsiLC.lsd());
|
|
|
|
data::LowSpeedData lsd = data::LowSpeedData(*m_dfsiLC.lsd());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t dstId = control.getDstId();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// don't process network frames if this modem isn't authoritative
|
|
|
|
|
|
|
|
if (!m_p25->m_authoritative && m_p25->m_permittedDstId != dstId) {
|
|
|
|
|
|
|
|
LogWarning(LOG_NET, "[NON-AUTHORITATIVE] Ignoring network traffic (LDU2), destination not permitted!");
|
|
|
|
|
|
|
|
resetNet();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// don't process network frames if the destination ID's don't match and the network TG hang timer is running
|
|
|
|
// don't process network frames if the destination ID's don't match and the network TG hang timer is running
|
|
|
|
if (m_p25->m_rfLastDstId != 0U) {
|
|
|
|
if (m_p25->m_rfLastDstId != 0U) {
|
|
|
|
if (m_p25->m_rfLastDstId != m_netLastLDU1.getDstId() && (m_p25->m_rfTGHang.isRunning() && !m_p25->m_rfTGHang.hasExpired())) {
|
|
|
|
if (m_p25->m_rfLastDstId != m_netLastLDU1.getDstId() && (m_p25->m_rfTGHang.isRunning() && !m_p25->m_rfTGHang.hasExpired())) {
|
|
|
|
|