1
0
Fork 0

Ignore incoming YSFO messages in the YSF Gateway.

ycs232-kbc
Jonathan Naylor 4 years ago
parent b55b6b3d31
commit 72ac3a7f8e

@ -19,6 +19,6 @@
#if !defined(VERSION_H) #if !defined(VERSION_H)
#define VERSION_H #define VERSION_H
const char* VERSION = "20200803"; const char* VERSION = "20200908";
#endif #endif

@ -197,6 +197,13 @@ void CYSFNetwork::clock(unsigned int ms)
if (address.s_addr != m_address.s_addr || port != m_port) if (address.s_addr != m_address.s_addr || port != m_port)
return; return;
if (m_debug)
CUtils::dump(1U, "YSF Network Data Received", buffer, length);
// Throw away any options messages
if (::memcmp(buffer, "YSFO", 4U) == 0)
return;
if (::memcmp(buffer, "YSFP", 4U) == 0 && !m_linked) { if (::memcmp(buffer, "YSFP", 4U) == 0 && !m_linked) {
if (strcmp(m_name.c_str(),"MMDVM")== 0) if (strcmp(m_name.c_str(),"MMDVM")== 0)
LogMessage("Link successful to %s", m_name.c_str()); LogMessage("Link successful to %s", m_name.c_str());
@ -209,9 +216,6 @@ void CYSFNetwork::clock(unsigned int ms)
m_socket.write(m_options, 50U, m_address, m_port); m_socket.write(m_options, 50U, m_address, m_port);
} }
if (m_debug)
CUtils::dump(1U, "YSF Network Data Received", buffer, length);
unsigned char len = length; unsigned char len = length;
m_buffer.addData(&len, 1U); m_buffer.addData(&len, 1U);

Loading…
Cancel
Save