From b8ce9459871e73b648acaea87c3258eb14338741 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 16 Jun 2016 17:39:16 +0100 Subject: [PATCH] Remove content duplicate removal, use sequence numbers only. --- YSFControl.cpp | 18 ++---------------- YSFControl.h | 1 - 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/YSFControl.cpp b/YSFControl.cpp index 01958d4..013c32f 100644 --- a/YSFControl.cpp +++ b/YSFControl.cpp @@ -48,7 +48,6 @@ m_netDest(NULL), m_rfPayload(), m_netPayload(), m_netSeqNo(0U), -m_netCsum(0U), m_fp(NULL) { assert(display != NULL); @@ -394,11 +393,11 @@ void CYSFControl::writeNetwork() m_netErrs = 0U; m_netBits = 1U; m_netSeqNo = 0U; - m_netCsum = 0U; } else { // Check for duplicate frames, if we can + // XXX this needs changing in the future if (m_netSeqNo == data[34U] && m_netSeqNo != 0U) { - LogDebug("YSF, removing network duplicate by sequence number - %u", data[34U] >> 1); + LogDebug("YSF, removing network duplicate, seq %u", data[34U] >> 1); return; } @@ -437,19 +436,6 @@ void CYSFControl::writeNetwork() unsigned char fi = fich.getFI(); unsigned char ft = fich.getFT(); - // XXX temporary duplicate removal, remove when everyone has upgraded their MMDVM Host - unsigned int csum = 0U; - for (unsigned int i = 0U; i < YSF_FRAME_LENGTH_BYTES; i++) - csum += data[i + 35U]; - - if (csum == m_netCsum) { - LogDebug("YSF, removing network duplicate by content checksum - %u", csum); - return; - } - - m_netCsum = csum; - // XXX temporary duplicate removal, remove when everyone has upgraded their MMDVM Host - // Set the downlink callsign switch (fi) { case YSF_FI_HEADER: diff --git a/YSFControl.h b/YSFControl.h index 6d3664c..402ba39 100644 --- a/YSFControl.h +++ b/YSFControl.h @@ -65,7 +65,6 @@ private: CYSFPayload m_rfPayload; CYSFPayload m_netPayload; unsigned char m_netSeqNo; - unsigned int m_netCsum; FILE* m_fp; void writeQueueRF(const unsigned char* data);