diff --git a/Conf.cpp b/Conf.cpp index bf1809100..eeead4960 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -118,12 +118,12 @@ m_fusionEnabled(true), m_fusionRemoteGateway(false), m_p25Enabled(true), m_p25NAC(0x293U), -m_dstarNetworkEnabled(true), +m_dstarNetworkEnabled(false), m_dstarGatewayAddress(), m_dstarGatewayPort(0U), m_dstarLocalPort(0U), m_dstarNetworkDebug(false), -m_dmrNetworkEnabled(true), +m_dmrNetworkEnabled(false), m_dmrNetworkAddress(), m_dmrNetworkPort(0U), m_dmrNetworkLocal(0U), @@ -139,7 +139,7 @@ m_fusionNetworkMyPort(0U), m_fusionNetworkGwyAddress(), m_fusionNetworkGwyPort(0U), m_fusionNetworkDebug(false), -m_p25NetworkEnabled(true), +m_p25NetworkEnabled(false), m_p25GatewayAddress(), m_p25GatewayPort(0U), m_p25LocalPort(0U), diff --git a/P25Control.cpp b/P25Control.cpp index 139626ec0..00039f388 100644 --- a/P25Control.cpp +++ b/P25Control.cpp @@ -337,8 +337,13 @@ void CP25Control::writeNetwork() break; case 0x6AU: ::memcpy(m_netLDU1 + 200U, data, 16U); - if (m_netState != RS_NET_IDLE) + if (m_netState != RS_NET_IDLE) { + // Check for an unflushed LDU2 + void* p = ::memchr(m_netLDU2, 0x02U, 9U * 25U); + if (p != NULL) + createNetLDU2(); createNetLDU1(); + } break; case 0x6BU: ::memcpy(m_netLDU2 + 0U, data, 22U); @@ -366,9 +371,14 @@ void CP25Control::writeNetwork() break; case 0x73U: ::memcpy(m_netLDU2 + 200U, data, 16U); - if (m_netState != RS_NET_IDLE) { + if (m_netState == RS_NET_IDLE) { createNetHeader(); createNetLDU1(); + } else { + // Check for an unflushed LDU1 + void* p = ::memchr(m_netLDU1, 0x02U, 9U * 25U); + if (p != NULL) + createNetLDU1(); } createNetLDU2(); break; @@ -641,11 +651,6 @@ void CP25Control::createNetHeader() void CP25Control::createNetLDU1() { - // Check for an unflushed LDU2 - void* p = ::memchr(m_netLDU2, 0x02U, 9U * 25U); - if (p != NULL) - createNetLDU2(); - insertMissingAudio(m_netLDU1); unsigned char buffer[P25_LDU_FRAME_LENGTH_BYTES + 2U]; @@ -695,11 +700,6 @@ void CP25Control::createNetLDU1() void CP25Control::createNetLDU2() { - // Check for an unflushed LDU1 - void* p = ::memchr(m_netLDU1, 0x02U, 9U * 25U); - if (p != NULL) - createNetLDU1(); - insertMissingAudio(m_netLDU2); unsigned char buffer[P25_LDU_FRAME_LENGTH_BYTES + 2U]; diff --git a/P25Data.cpp b/P25Data.cpp index 1933590f7..a2d6b4839 100644 --- a/P25Data.cpp +++ b/P25Data.cpp @@ -97,10 +97,8 @@ bool CP25Data::decodeLDU1(const unsigned char* data) decodeLDUHamming(raw, rs + 15U); bool ret = m_rs241213.decode(rs); - if (!ret) { - LogDebug("P25, uncorrectable errors in the RS(24,12,13) code"); + if (!ret) return false; - } switch (m_lcf) { case P25_LCF_GROUP: