Fixed minor bug in simplified code.

This commit is contained in:
Jonathan Naylor 2018-03-22 19:24:59 +00:00
parent f1eb11a0d3
commit c54330e414
4 changed files with 4 additions and 4 deletions

View File

@ -80,7 +80,7 @@ bool CNXCoreNetwork::write(const unsigned char* data, unsigned int len)
return m_socket.write(buffer, 102U, m_address, NXCORE_PORT); return m_socket.write(buffer, 102U, m_address, NXCORE_PORT);
} }
unsigned int CNXCoreNetwork::read(unsigned char* data, unsigned int len) unsigned int CNXCoreNetwork::read(unsigned char* data)
{ {
unsigned char buffer[BUFFER_LENGTH]; unsigned char buffer[BUFFER_LENGTH];

View File

@ -34,7 +34,7 @@ public:
bool write(const unsigned char* data, unsigned int len); bool write(const unsigned char* data, unsigned int len);
unsigned int read(unsigned char* data, unsigned int len); unsigned int read(unsigned char* data);
void close(); void close();

View File

@ -102,7 +102,7 @@ unsigned int CNXDNNetwork::read(unsigned char* data, unsigned int length, in_add
if (::memcmp(data, "NXDN", 4U) != 0) if (::memcmp(data, "NXDN", 4U) != 0)
return 0U; return 0U;
if (length != 15 && length != 43) if (len != 15 && len != 43)
return 0U; return 0U;
if (m_debug) if (m_debug)

View File

@ -300,7 +300,7 @@ void CNXDNReflector::run()
} }
if (m_nxCoreNetwork != NULL) { if (m_nxCoreNetwork != NULL) {
len = m_nxCoreNetwork->read(buffer, 200U); len = m_nxCoreNetwork->read(buffer);
if (len > 0U) { if (len > 0U) {
if (current == NULL) { if (current == NULL) {
if (!nxCoreActive) { if (!nxCoreActive) {