From 0ce166fa150faad3117b47bb85417944af8acbb4 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Sun, 23 Jan 2022 14:13:37 -0700 Subject: [PATCH] don't dump unknown YSF packet, there's too many! --- reflector/YSFProtocol.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/reflector/YSFProtocol.cpp b/reflector/YSFProtocol.cpp index 4581045..1a59f96 100644 --- a/reflector/YSFProtocol.cpp +++ b/reflector/YSFProtocol.cpp @@ -186,19 +186,11 @@ void CYsfProtocol::Task(void) EncodeServerStatusPacket(&Buffer); Send(Buffer, Ip); } - else if ( Buffer.size() == 80 && 0 == memcmp(Buffer.data(), "YSFI", 4) ) - { - // do nothing, it's unneeded information from BlueDV - } - else if ( Buffer.size() == 50 && 0 == memcmp(Buffer.data(), "YSFO", 4) ) - { - // do nothing, it's unneeded options from BlueDV - } else { - std::string title("Unknown YSF packet from "); - title += Ip.GetAddress(); - Buffer.Dump(title); + // std::string title("Unknown YSF packet from "); + // title += Ip.GetAddress(); + // Buffer.Dump(title); } } @@ -743,11 +735,9 @@ bool CYsfProtocol::IsValidwirexPacket(const CBuffer &Buffer, CYSFFICH *Fich, CCa // decode YSH fich if ( Fich->decode(&(Buffer.data()[40])) ) { - //std::cout << (int)Fich->getDT() << "," - // << (int)Fich->getFI() << "," - // << (int)Fich->getFN() << "," - // << (int)Fich->getFT() - // << std::endl; +#ifdef DEBUG + std::cout <<"DT=" << (int)Fich->getDT() << " FI=" << (int)Fich->getFI() << " FN=" << (int)Fich->getFN() << " FT=" << (int)Fich->getFT() << std::endl; +#endif valid = (Fich->getDT() == YSF_DT_DATA_FR_MODE); valid &= (Fich->getFI() == YSF_FI_COMMUNICATIONS); if ( valid )