mirror of
https://github.com/ShaYmez/NXDNClients.git
synced 2025-08-03 05:22:24 -04:00
Fix end of transmission markers in the NXDN protocol.
This commit is contained in:
parent
50d109aefe
commit
6db1672ff7
@ -67,8 +67,8 @@ bool CNXDNNetwork::writeData(const unsigned char* data, unsigned int length, uns
|
|||||||
buffer[9U] |= grp ? 0x01U : 0x00U;
|
buffer[9U] |= grp ? 0x01U : 0x00U;
|
||||||
|
|
||||||
if (data[0U] == 0x81U || data[0U] == 0x83U) {
|
if (data[0U] == 0x81U || data[0U] == 0x83U) {
|
||||||
buffer[9U] |= buffer[5U] == 0x01U ? 0x04U : 0x00U;
|
buffer[9U] |= data[5U] == 0x01U ? 0x04U : 0x00U;
|
||||||
buffer[9U] |= buffer[5U] == 0x08U ? 0x08U : 0x00U;
|
buffer[9U] |= data[5U] == 0x08U ? 0x08U : 0x00U;
|
||||||
}
|
}
|
||||||
|
|
||||||
::memcpy(buffer + 10U, data, 33U);
|
::memcpy(buffer + 10U, data, 33U);
|
||||||
|
@ -85,7 +85,7 @@ void CNXDNParrot::run()
|
|||||||
parrot.write(buffer, len);
|
parrot.write(buffer, len);
|
||||||
watchdogTimer.start();
|
watchdogTimer.start();
|
||||||
|
|
||||||
if ((buffer[9U] & 0x04U) == 0x04U) {
|
if ((buffer[9U] & 0x08U) == 0x08U) {
|
||||||
::fprintf(stdout, "Received end of transmission\n");
|
::fprintf(stdout, "Received end of transmission\n");
|
||||||
turnaroundTimer.start();
|
turnaroundTimer.start();
|
||||||
watchdogTimer.stop();
|
watchdogTimer.stop();
|
||||||
|
@ -263,7 +263,7 @@ void CNXDNReflector::run()
|
|||||||
nxCoreNetwork->write(buffer, len);
|
nxCoreNetwork->write(buffer, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((buffer[9U] & 0x04U) == 0x04U) {
|
if ((buffer[9U] & 0x08U) == 0x08U) {
|
||||||
LogMessage("Received end of transmission");
|
LogMessage("Received end of transmission");
|
||||||
watchdogTimer.stop();
|
watchdogTimer.stop();
|
||||||
current = NULL;
|
current = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user