From 50337639b2f6d66153bd699cf22dcff1ee247a7c Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 25 Jun 2021 16:21:48 +0100 Subject: [PATCH] Accept rejected or invalid transmissions as being 'in' despite not being relayed. Also give extra headroom on the convolution decoders. --- DStarControl.cpp | 4 ++-- M17Control.cpp | 4 ++-- M17Convolution.cpp | 4 ++-- NXDNControl.cpp | 4 ++-- NXDNConvolution.cpp | 4 ++-- Version.h | 2 +- YSFControl.cpp | 8 ++++---- YSFConvolution.cpp | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/DStarControl.cpp b/DStarControl.cpp index 62628db..7df49c8 100644 --- a/DStarControl.cpp +++ b/DStarControl.cpp @@ -434,9 +434,9 @@ bool CDStarControl::writeModem(unsigned char *data, unsigned int len) return false; } else if (type == TAG_DATA1) { if (m_rfState == RS_RF_REJECTED) { - return false; + return true; } else if (m_rfState == RS_RF_INVALID) { - return false; + return true; } else if (m_rfState == RS_RF_LISTENING) { // The sync is regenerated by the modem so can do exact match if (::memcmp(data + 1U + DSTAR_VOICE_FRAME_LENGTH_BYTES, DSTAR_SYNC_BYTES, DSTAR_DATA_FRAME_LENGTH_BYTES) == 0) { diff --git a/M17Control.cpp b/M17Control.cpp index b4773b0..a5d5b34 100644 --- a/M17Control.cpp +++ b/M17Control.cpp @@ -554,7 +554,7 @@ bool CM17Control::processRFHeader(bool lateEntry) if (type != M17_ENCRYPTION_TYPE_NONE) { LogMessage("M17, access attempt with encryption from %s to %s", source.c_str(), dest.c_str()); m_rfState = RS_RF_REJECTED; - return false; + return true; } } @@ -563,7 +563,7 @@ bool CM17Control::processRFHeader(bool lateEntry) if (!ret) { LogMessage("M17, invalid access attempt from %s to %s", source.c_str(), dest.c_str()); m_rfState = RS_RF_REJECTED; - return false; + return true; } } diff --git a/M17Convolution.cpp b/M17Convolution.cpp index b7b17f5..ae99c46 100644 --- a/M17Convolution.cpp +++ b/M17Convolution.cpp @@ -56,8 +56,8 @@ m_newMetrics(NULL), m_decisions(NULL), m_dp(NULL) { - m_metrics1 = new uint16_t[16U]; - m_metrics2 = new uint16_t[16U]; + m_metrics1 = new uint16_t[20U]; + m_metrics2 = new uint16_t[20U]; m_decisions = new uint64_t[300U]; } diff --git a/NXDNControl.cpp b/NXDNControl.cpp index d040ca7..f26965a 100644 --- a/NXDNControl.cpp +++ b/NXDNControl.cpp @@ -214,7 +214,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne unsigned short srcId = layer3.getSourceUnitId(); if (srcId != m_id) { m_rfState = RS_RF_REJECTED; - return false; + return true; } } } else { @@ -375,7 +375,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne if (m_selfOnly) { if (srcId != m_id) { m_rfState = RS_RF_REJECTED; - return false; + return true; } } diff --git a/NXDNConvolution.cpp b/NXDNConvolution.cpp index d74fe2a..10c4504 100644 --- a/NXDNConvolution.cpp +++ b/NXDNConvolution.cpp @@ -44,8 +44,8 @@ m_newMetrics(NULL), m_decisions(NULL), m_dp(NULL) { - m_metrics1 = new uint16_t[16U]; - m_metrics2 = new uint16_t[16U]; + m_metrics1 = new uint16_t[20U]; + m_metrics2 = new uint16_t[20U]; m_decisions = new uint64_t[300U]; } diff --git a/Version.h b/Version.h index 268714e..888ab6a 100644 --- a/Version.h +++ b/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20210618"; +const char* VERSION = "20210625"; #endif diff --git a/YSFControl.cpp b/YSFControl.cpp index efb2213..a585618 100644 --- a/YSFControl.cpp +++ b/YSFControl.cpp @@ -233,7 +233,7 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data) if (!ret) { LogMessage("YSF, invalid access attempt from %10.10s to DG-ID %u", m_rfSource, dgid); m_rfState = RS_RF_REJECTED; - return false; + return true; } } @@ -402,7 +402,7 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) if (!ret) { LogMessage("YSF, invalid access attempt from %10.10s to DG-ID %u", m_rfSource, dgid); m_rfState = RS_RF_REJECTED; - return false; + return true; } } @@ -598,7 +598,7 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data) if (!ret) { LogMessage("YSF, invalid access attempt from %10.10s to DG-ID %u", m_rfSource, dgid); m_rfState = RS_RF_REJECTED; - return false; + return true; } } @@ -704,7 +704,7 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data) if (!ret) { LogMessage("YSF, invalid access attempt from %10.10s to DG-ID %u", m_rfSource, dgid); m_rfState = RS_RF_REJECTED; - return false; + return true; } } diff --git a/YSFConvolution.cpp b/YSFConvolution.cpp index f1f8a7a..e1d705a 100644 --- a/YSFConvolution.cpp +++ b/YSFConvolution.cpp @@ -43,8 +43,8 @@ m_newMetrics(NULL), m_decisions(NULL), m_dp(NULL) { - m_metrics1 = new uint16_t[16U]; - m_metrics2 = new uint16_t[16U]; + m_metrics1 = new uint16_t[20U]; + m_metrics2 = new uint16_t[20U]; m_decisions = new uint64_t[180U]; }