From ce4c2c6c87320c59de3ee98a1341d9d41cd16439 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Mon, 23 Nov 2026 12:45:39 -0500 Subject: [PATCH] correct P25 network voice grant rejection handling to reset call state and prevent denied calls from entering active network audio; --- src/host/p25/packet/Voice.cpp | 39 +++++++++++++++-------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/src/host/p25/packet/Voice.cpp b/src/host/p25/packet/Voice.cpp index cdae3bdf..7e126751 100644 --- a/src/host/p25/packet/Voice.cpp +++ b/src/host/p25/packet/Voice.cpp @@ -1957,34 +1957,29 @@ void Voice::writeNet_LDU1() LogError(LOG_NET, P25_HDU_STR " call rejected, network call not granted, dstId = %u", dstId); } - if ((!m_p25->m_networkWatchdog.isRunning() || m_p25->m_networkWatchdog.hasExpired()) && - m_p25->m_netLastDstId != 0U) { - LogWarning(LOG_NET, P25_HDU_STR ", call rejected, network watchdog not running or expired, netLastDstId = %u", m_p25->m_netLastDstId); + if (m_p25->m_network != nullptr) + m_p25->m_network->resetP25(); - if (m_p25->m_network != nullptr) - m_p25->m_network->resetP25(); + resetWithNullAudio(m_netLDU1, false); + resetWithNullAudio(m_netLDU2, false); - resetWithNullAudio(m_netLDU1, false); - resetWithNullAudio(m_netLDU2, false); + m_p25->m_netTimeoutTimer.stop(); + m_p25->m_netTimeout = false; + m_p25->m_netTGHang.stop(); + m_p25->m_networkWatchdog.stop(); - m_p25->m_netTimeoutTimer.stop(); - m_p25->m_netTimeout = false; - m_p25->m_networkWatchdog.stop(); - - m_netLC = lc::LC(); - m_netLastLDU1 = lc::LC(); - m_netLastFrameType = FrameType::DATA_UNIT; - - m_p25->m_netState = RS_NET_IDLE; - m_p25->m_netLastDstId = 0U; - m_p25->m_netLastSrcId = 0U; + resetNet(); + m_netLastFrameType = FrameType::DATA_UNIT; - if (m_p25->m_rfState == RS_RF_REJECTED) { - m_p25->m_rfState = RS_RF_LISTENING; - } + m_p25->m_netState = RS_NET_IDLE; + m_p25->m_netLastDstId = 0U; + m_p25->m_netLastSrcId = 0U; - return; + if (m_p25->m_rfState == RS_RF_REJECTED) { + m_p25->m_rfState = RS_RF_LISTENING; } + + return; } }