From ad8713fbe8e328b6c86a5ea11e58053d03055fa1 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Fri, 28 Feb 2025 09:24:18 -0500 Subject: [PATCH] issue a P_CLEAR proper at the end of a network call; --- src/host/dmr/Slot.cpp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/host/dmr/Slot.cpp b/src/host/dmr/Slot.cpp index c028605a..4cc7ad00 100644 --- a/src/host/dmr/Slot.cpp +++ b/src/host/dmr/Slot.cpp @@ -1163,15 +1163,15 @@ void Slot::processFrameLoss() m_slotNo, m_rfFrames, m_rfBits, m_rfErrs, float(m_rfErrs * 100U) / float(m_rfBits)); // release trunked grant (if necessary) - Slot *m_tscc = m_dmr->getTSCCSlot(); - if (m_tscc != nullptr) { - if (m_tscc->m_enableTSCC && m_rfLC != nullptr) { - m_tscc->m_affiliations->releaseGrant(m_rfLC->getDstId(), false); + Slot* tscc = m_dmr->getTSCCSlot(); + if (tscc != nullptr) { + if (tscc->m_enableTSCC && m_rfLC != nullptr) { + tscc->m_affiliations->releaseGrant(m_rfLC->getDstId(), false); } clearTSCCActivated(); - if (!m_tscc->m_enableTSCC) { + if (!tscc->m_enableTSCC) { notifyCC_ReleaseGrant(m_rfLC->getDstId()); } } @@ -1397,6 +1397,20 @@ void Slot::writeEndNet(bool writeEnd) } } + // release trunked grant (if necessary) + Slot* tscc = m_dmr->getTSCCSlot(); + if (tscc != nullptr) { + if (tscc->m_enableTSCC && m_rfLC != nullptr) { + tscc->m_affiliations->releaseGrant(m_rfLC->getDstId(), false); + } + + clearTSCCActivated(); + + if (!tscc->m_enableTSCC) { + notifyCC_ReleaseGrant(m_rfLC->getDstId()); + } + } + m_data->m_pduDataOffset = 0U; if (m_network != nullptr)