From 3aca4258211914f6f4c46085324c8f7589b03de3 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 13 Oct 2016 22:54:45 +0100 Subject: [PATCH] Fix detection of P25 end of network transmission. --- P25Control.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/P25Control.cpp b/P25Control.cpp index c82d313..9273419 100644 --- a/P25Control.cpp +++ b/P25Control.cpp @@ -718,13 +718,13 @@ void CP25Control::createNetLDU1() writeQueueNet(buffer, P25_LDU_FRAME_LENGTH_BYTES + 2U); - ::memset(m_netLDU1, 0x00U, 9U * 25U); - - m_netFrames += 9U; - // Check for an end of stream marker if (m_netLDU1[200U] == 0x6AU && m_netLDU1[215U] == 0x00U) createNetTerminator(); + + ::memset(m_netLDU1, 0x00U, 9U * 25U); + + m_netFrames += 9U; } void CP25Control::createNetLDU2() @@ -767,13 +767,13 @@ void CP25Control::createNetLDU2() writeQueueNet(buffer, P25_LDU_FRAME_LENGTH_BYTES + 2U); - ::memset(m_netLDU2, 0x00U, 9U * 25U); - - m_netFrames += 9U; - // Check for an end of stream marker if (m_netLDU2[200U] == 0x73U && m_netLDU2[215U] == 0x00U) createNetTerminator(); + + ::memset(m_netLDU2, 0x00U, 9U * 25U); + + m_netFrames += 9U; } void CP25Control::createNetTerminator()