From 489d6077fdf9983a553d6a3b86cf914d60696040 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 9 Jun 2016 17:35:52 +0100 Subject: [PATCH] Change EOF handling. --- YSFGateway/YSFGateway.cpp | 2 +- YSFParrot/YSFParrot.cpp | 2 +- YSFReflector/YSFReflector.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index e5557ed..c52d901 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -254,7 +254,7 @@ int CYSFGateway::run() if (networkEnabled && m_linked && !m_exclude) m_netNetwork->write(buffer); - if (buffer[34U] == 0x01U) { + if ((buffer[34U] & 0x01U) == 0x01U) { if (m_gps != NULL) m_gps->reset(); watchdogTimer.stop(); diff --git a/YSFParrot/YSFParrot.cpp b/YSFParrot/YSFParrot.cpp index e25c9b9..ba7d47a 100644 --- a/YSFParrot/YSFParrot.cpp +++ b/YSFParrot/YSFParrot.cpp @@ -82,7 +82,7 @@ void CYSFParrot::run() parrot.write(buffer); watchdogTimer.start(); - if (buffer[34U] == 0x01U) { + if ((buffer[34U] & 0x01U) == 0x01U) { ::fprintf(stdout, "Received end of transmission\n"); turnaroundTimer.start(); watchdogTimer.stop(); diff --git a/YSFReflector/YSFReflector.cpp b/YSFReflector/YSFReflector.cpp index 253c239..7b14f09 100644 --- a/YSFReflector/YSFReflector.cpp +++ b/YSFReflector/YSFReflector.cpp @@ -226,7 +226,7 @@ void CYSFReflector::run() } } - if (buffer[34U] == 0x01U) { + if ((buffer[34U] & 0x01U) == 0x01U) { LogMessage("Received end of transmission"); watchdogTimer.stop(); }