Validate the NXDN protocol in the Parrot and Gateway.

This commit is contained in:
Jonathan Naylor
2018-03-15 19:21:59 +00:00
parent 6db1672ff7
commit 14ef0fb080
3 changed files with 13 additions and 9 deletions
+2 -2
View File
@@ -66,9 +66,9 @@ void CNetwork::clock(unsigned int ms)
m_address.s_addr = address.s_addr;
m_port = port;
if (::memcmp(buffer, "NXDNP", 5U) == 0) { // A poll
if (::memcmp(buffer, "NXDNP", 5U) == 0 && length == 15) { // A poll
write(buffer, length);
} else if (::memcmp(buffer, "NXDND", 5U) == 0) {
} else if (::memcmp(buffer, "NXDND", 5U) == 0 && length == 43) {
unsigned char l = length;
m_buffer.addData(&l, 1U);
m_buffer.addData(buffer, length);