From 332ca17f269499e6e15a7de842bbad6deb06cd42 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 4 Jun 2020 12:23:24 +0100 Subject: [PATCH] Fixed startup bug. --- NXDNGateway/APRSWriter.cpp | 12 ++++++++++-- NXDNGateway/Version.h | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/NXDNGateway/APRSWriter.cpp b/NXDNGateway/APRSWriter.cpp index b6c9dd0..4af0f7d 100644 --- a/NXDNGateway/APRSWriter.cpp +++ b/NXDNGateway/APRSWriter.cpp @@ -40,7 +40,7 @@ m_aprsSocket() #if !defined(_WIN32) && !defined(_WIN64) ,m_gpsdEnabled(false), m_gpsdAddress(), -m_gpsdPort(0U), +m_gpsdPort(), m_gpsdData() #endif { @@ -98,6 +98,8 @@ bool CAPRSWriter::open() ::gps_stream(&m_gpsdData, WATCH_ENABLE | WATCH_JSON, NULL); + LogMessage("Connected to GPSD"); + // Poll the GPS every minute m_idTimer.setTimeout(60U); } else { @@ -108,7 +110,13 @@ bool CAPRSWriter::open() #endif m_idTimer.start(); - return m_aprsSocket.open(); + bool ret = m_aprsSocket.open(); + if (!ret) + return false; + + LogMessage("Opened connection to the APRS Gateway"); + + return true; } void CAPRSWriter::write(const char* data) diff --git a/NXDNGateway/Version.h b/NXDNGateway/Version.h index 64b1742..a17701b 100644 --- a/NXDNGateway/Version.h +++ b/NXDNGateway/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20200603"; +const char* VERSION = "20200604"; #endif