From 4f6356212b3af75ae0e3287d3e8dc8f3db258061 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 31 Oct 2016 17:55:38 +0000 Subject: [PATCH] Handle corrupted network DMR LCs more gracefully. --- DMRSlot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DMRSlot.cpp b/DMRSlot.cpp index 3e379f2..ab5cbdc 100644 --- a/DMRSlot.cpp +++ b/DMRSlot.cpp @@ -766,8 +766,8 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData) CDMRFullLC fullLC; m_netLC = fullLC.decode(data + 2U, DT_VOICE_LC_HEADER); if (m_netLC == NULL) { - LogMessage("DMR Slot %u, bad LC received from the network", m_slotNo); - return; + LogMessage("DMR Slot %u, bad LC received from the network, replacing", m_slotNo); + m_netLC = new CDMRLC(dmrData.getFLCO(), dmrData.getSrcId(), dmrData.getDstId()); } unsigned int did = m_netLC->getDstId();